Wednesday, October 2, 2013

Why CSS hates IE?

 Creating Software Web product with attractive UI and Rich Client Application necessitates the heavier use of CSS. Number of CSS files and rules used in the application grows heavily in the modern day powerful web applications. Cross browser compatibility is a major challenge in web applications. Internet Explorer has specific challenges while handling CSS.  While designing the UI architecture, It is very important to consider some of the specific limitation with respect to IE .

Number of File Links per Page

Internet Explorer can accept only 32 file links per page. If you have more than 32 files, additional files will be just ignored. If you have more than 32 files, You may need to combine the CSS content to fewer files.  Normally, You can use some minifying/combining program to create single large file. But your ordeal will not end with this approach.  There is an another limitation that will hit you by this approach.

Number of Rules per Page

To make the web page render fast, Combining the files and Minification of JavaScript and CSS files are common practice. There are various advantage of CSS files Minification. Some of them are

  • Number of request from request from client to server reduces
  • Size of the File transfer reduces
  • IE limitation with number of CSS file per page can be handled
But IE has one more limitation. Number of CSS rule per page is limited to 4095.  If you have more styles, those styles will be ignored as usual.

When you write minification program, You need to Create multiple minified CSS files by considering 4095 rule!

IE accepts 32 files alone per page . At the same time, Maximum CSS rules allowed per page is 4095. CSS always hates Internet Explorer!