Not all Ext components use CSS Sprites - why?
I noticed that only some ExtJS components/widgets use CSS sprites for the images and icons. But was wondering why hasn't this been implemented universally across all widgets and components.
The icons in the Tree component, for example, doesn't use sprites.
In IE6, where the browser only allows for up to 4 concurrent outbound connections per-domain, it takes a bit of time to download all the Tree icons (i.e. the folder and elbow icons). Implementing this using CSS Sprites would make loading quicker in this case.
I could easily implement this on my own using my own css file to override the default ExtJS css rules, however I would rather avoid this so that I don't have to keep on updating with each release (should the icons change).
My questions for the ExtJS dev team are:
- Are there any technical limitations or things to be aware of when implementing CSS Sprites for components such as the Tree?
- Will we see universal implementation of CSS Sprites across all/most ExtJS components in the future?
Images Base64 encoded + gzip'ed and it works in IE6+ as well!
While reading on ajaxian.com I stumbled over an article on Cappuccino and spriting:
, here they use another approach which I have not seen before so it is both possible to use 1) one file for all images and 2) base64 encoding so it even works in IE 6+:
They use MHTML for IE6+ to support base64 encoding - pretty smart! However I wonder what the size difference is for say 1,2 or 3 large sprites of either png or jpeg format compared to base64 encoding+gzip of the common file containing everything - but anyway e.g. for embedded usage: Having one file to download would be just great!
The great thing is of course then there is no need to analyse how each image is dimensioned regarding making a "sprite", but you may still want to exclude some images referenced by css-files.
This should also allow gif-support without hassle.
However I wonder about what kind of support Microsoft have put into MHTML regarding base64 encoding. In IE 8 there is support for data URI, but according to http://en.wikipedia.org/wiki/Data_UR...#Disadvantages and http://msdn.microsoft.com/en-us/libr...97(VS.85).aspx it is specified that there are only 32 kilo bytes available.
MHTML is explained here: http://en.wikipedia.org/wiki/MHTML
, especially in the links on that wiki page. However I "guess" mhtml does not have this 32 kb limit, since it can be used for flash files, java etc. - which is kind of neat.