pkdevbox / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

[PATCH] Use dataURL for often used images to reduce the amount of requests #154

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Information whats this all about, pros&cons on this excellent page:
http://www.sveinbjorn.org/dataurls_css

I used this technique for the common images like the toolbar, backbutton,
and the panel stripes. I wanted to use it for the arrow too but its used
with other background-images so it would blow the css up.

You can see the effect if you visit
http://melcher.it/iui/samples/music.html#_home and check how many images
are loaded with web inspector or firebug (it should be one, the rest are
encoded in the css file).
The CSS-File is still far below 25kb, so still cacheable - but in this
example 3 requests are gone!

Its just an idea but i think its worth a try to continue that.

Original issue reported on code.google.com by kaisergi...@googlemail.com on 28 Jul 2009 at 2:28

Attachments:

GoogleCodeExporter commented 9 years ago
Is there a script to automatically insert the data URLs into  the CSS file.  
Ideally, it would be an Ant task or 
integrate well with the Ant build.  (In the worst case Ant can call any shell 
script.)

If we can get it integrated with the build, we could produce an iui-dataurl.css 
as part of the build process and 
give users a choice.  Since many users customize the images the build script 
would allow them to easy make data  
URLs out of their custom images.

Original comment by msgilli...@gmail.com on 28 Jul 2009 at 3:10

GoogleCodeExporter commented 9 years ago
http://www.sveinbjorn.org/files/software/dataurlmaker/dataurlmaker.gz is a perl
script - but dont use it for all images, that makes no sense in my eyes.

Original comment by kaisergi...@googlemail.com on 28 Jul 2009 at 3:51