Internet Explorer CSS File Size Limit

Friday, January 25, 2008

Today I encountered a problem where in IE7 and IE6 it appeared as if some parts of my CSS style was not loading.  I tracked the problem down to what appears to be a file size limit of ~288kb for .css files.  In IE only the first 288kb in a file will be read and processed.  Any CSS after 288kb will be ignored. 

In this particular case I was loaded a CSS file of 347kb. 

Firefox does not seem to have a limit. 

The limit appears to be a "per file" limit.  You can split the CSS into two files and it will work fine. 

You may be asking yourself, why would you ever have a CSS file which is 347kb?  Good question... but we use a large file size in our site design application at http://rhythmwebdesign.com   The CSS ends up being gzipped and is only 35kb when you download it when loading the designer.