views:

24

answers:

4

When we keep JS and CSS files for IE only with tags, do other browsers read it. I understand they ignore it but do they download all the files and then ignore it or vice versa. My reason for asking is page performance.

+1  A: 

The files are ignored by other browsers.

Note how

<!--[if IE]>
    You are using IE (IE5+ and above).
<![endif]-->

starts and ends within <!-- normal html comments -->. They are treated special by IE, but other browsers just see a comment.

Magnar
A: 

If you're talking about conditional comments, then only IE can parse these so only IE will even comprehend that there is a resource to be downloaded.

annakata
A: 

If your conditions surround the IE specific resources, they shouldn't be requested. You can use a tool such as Fiddler or HttpFox (for Firefox) to confirm.

Danny Thomas
Thanks. It's very helpful. I used 'Net' tab in Firebub to see exactly what loads when a page is requested.
A: 

Other browsers just see the comment markers and skip over them. IE is the only browser to which they have any special meaning.

tdammers