Sunday, June 12, 2011

IE8 quirk- CSS file requested twice when you use relative protocol path

In IE8, if you use a relative protocol path for CSS file, it is downloaded twice. In the screenshot below I have used an absolute path for master.css file and relative path for master1.css. As you can see, two requests are made for master1.css file and only one request for master.css. There is no such issue for javascript file. The jquery file uses relative path in this example and only one request is made.


Therefore, make sure you are using an absolute protocol path for CSS file and not relative protocol path.

2 comments:

Matthew Brundage said...

Looks like this bug was fixed for IE9 -- I just did a test using Fiddler2.

Harinder Seera said...

Thanks, Matthew for letting me know that this bug is fixed in IE9.