Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE8/9 - Maximum bytes for CSS file

The application I am currently working on has excessive CSS styling and we seemed to have reached some sort of limitation with IE8/9 and how much CSS it can load. At some point it stops interpreting the CSS therefore breaking style on some pages. We are using Combres to compress/minify the files which is causing such large CSS files. This seems to happen in the 400KB-450KB range (Yes, I know that is way too much for any CSS).

So my question: What is the maximum size for a single CSS file in IE?

Also would enabling GZIP compression help? IIS has dynamic/static compression enabled and it seems to work in Chrome but not IE.

like image 358
Morgan T. Avatar asked Sep 20 '12 20:09

Morgan T.


2 Answers

You are right with the file size being the issue (although there is also a maximum amount of selectors IE will parse). Compression won't help beyond the minification you are already doing, but splitting the CSS into two files will solve your problem.

All of the limitations are on a per-file basis. Consider separating out the CSS by feature set and only loading the CSS when needed.

like image 166
Matthew Darnell Avatar answered Nov 15 '22 23:11

Matthew Darnell


For IE up to IE9 the css file size is max 288kb

like image 42
Ram Avatar answered Nov 15 '22 21:11

Ram