- From: Patrick Garies <pgaries@fastmail.us>
- Date: Thu, 24 Jul 2008 01:31:40 -0500
- To: David Perrell <davidp@hpaa.com>
- CC: www-dom@w3.org
David Perrell wrote: > 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. The primary point of the CC‐based approach is to work around this issue. David Perrell wrote: > 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. I didn’t dispute this. I simply noted that the mentioned MIME type is deprecated. David Perrell wrote: > IMHO, conditional mime types are a bit premature. I’m curious as to what criteria should be used to determine when the time is “mature” in your view. The older MIME types text/javascript and text/ecmascript are essentially deprecated per RFC4329 (or “obsolete” as that RFC, unfortunately, puts it); RFC4329 is already on the IANA MIME Media Types list. The question is: “Can you start using the new MIME types here and now without significantly hurting anything?” The answer may vary depending upon your goals; in my case and, probably, most people’s cases (where they have enough control over their code to use CCs), the answer is “Yes.”. David Perrell wrote: > If you're presenting plain HTML then it should be safe to use the > <script> tag without a type declaration. I agree. However, it is “safe” to do quite a number of things that are not technically correct per specification(s), not conforming, invalid, or poor practice. In this case, omission of the |type| attribute makes the document invalid (and non‐conforming?) and keeping it doesn’t hurt anything. I prefer to write documents that are valid and conforming since I believe that doing so is good form and, naturally, suggest that others do the same (as I did here). Anyway, I don’t see how this even matters unless you’re suggesting that nimblehost should drop the attribute entirely. David Perrell wrote: > However obsolete, "text/javascript" is currently the most-supported > content type for javascript and was probably a wise choice. I’ve recognized the support levels for the various MIME types and my CC‐based approach takes this into account. (*/javascript can be substituted for */ecmascript in the example code that I previously presented, if preferred.) If you need to support browsers that don’t support the new application/* MIME types and/or the CC‐based solution doesn’t work for you (e.g., the problematic browsers are not WIE), then, by all means, use the text/javascript MIME type. As a side note, I disagree with the term “obsolete” which means “useless” (clearly, text/javascript has not entered the realm of being useless); I prefer use of the term “deprecated” (“disfavored”). David Perrell wrote: > I read an IE8 blog complaint: IE8b1 doesn't support the new mime > types. Perhaps that will change before final release. That’s both interesting and unfortunate. — Patrick Garies
Received on Thursday, 24 July 2008 06:32:22 UTC