RE: Using DOM to replace media attribute in the link tag on page load

Patrick Garies wrote:
| I said “up to version 7”, so that includes version 7 itself too. The way 
| that I implement it is by use of conditional comments:

IE > 6 won't run on pre-XP Windows and there are clearly many who feel no need to upgrade their OpSys or change its default UA. Meanwhile, there are millions of web pages with script typed as "text/javascript". UA acceptance of "text/javascript" won't be going away any time soon. IMHO, conditional mime types are a bit premature.

If you're presenting plain HTML then it should be safe to use the <script> tag without a type declaration. Is there a browser for which javascript isn't the default script language? 

HTML 4.01 spec uses "text/javascript" as a content type example. However obsolete, "text/javascript" is currently the most-supported content type for javascript and was probably a wise choice.

| Hopefully, WIE8 will support the two new MIME types so that the 
| messiness above can eventually be done away with.

I read an IE8 blog complaint: IE8b1 doesn't support the new mime types. Perhaps that will change before final release.

David Perrell

Received on Wednesday, 23 July 2008 23:35:24 UTC