Markus Peloquin wrote:
> The point is that 'application/javascript' is not recognized.
But that's not what you said in your original post. If you˙re coding
with a strict doctype, you definitely don˙t want to use any deprecated
attributes or elements.
http://hafnerdesigns.com/blog/2009/0...ionjavascript/
Where does W3C.org say text/javascript has been deprecated? I looked in
the HTML 5.0 spec at:
http://dev.w3.org/html5/spec/Overview.html#scripting-1
and the mention the attribute and *without* noting it has been
deprecated. From what I recall, if you saw an element or attribute that
had been deprecated, there was a "[DEPRECATED]" link next to it. In
this HTML spec, no such deprecated link, but there is a link to RFC
2046. In fact, if I search the entire HTML 5.0 spec, there was no match
on "application/javascript".
So I went to
http://www.rfc-editor.org/rfc/rfc2046.txt. I didn't find a
list of script content types there. What I did find is:
- Text media types are for ´textual information [for which] no special
software is required to get the full meaning of the textˇ
- Application media types are for ´information to be processed by an
application.ˇ
So, yeah, the obsolence makes sense since an interpreter is involved to
process that text. Seems like this wasn't a problem, however, until
around 2006 although RFC 2036 was ratified back in 1996.
I did find text/javascript[ver] and application/javascript mentioned at
http://www.rfc-editor.org/rfc/rfc4329.txt - but this is an informational
RFC, not a standards RFC. It mentions the text/javascript content type
is obsolete but gives no references to a standards RFC for verification.
So is the obsolescence only proposed or has it been ratified? Several
folks have cited RFC 4329 as registering those application types for
script languages but that is NOT what that RFC does. As an example,
http://connect.microsoft.com/IE/feed...dbackID=338278
has someone again claiming RFC 4329 is a standard when it is NOT. Note
that RFC 4329 is "Category: Informational" whereas RFC 2046, for example
is "Category: Standards Track".
text/javascript was an unregistered content type and yet it was
documented in HTML 4.01 and was used by all web browsers. The newer
proposed application/javascript might be supported in web browsers other
than IE but then they don't handle text/javascript and text/ecmascript
any differently than application/javascript and application/ecmascript.
Gotta love them MIMEtype wars. Hell, at some point, they may even
unobsolete the obsoleted MIME types.
I guess when RFC 4329 is no longer an informational article and when
text/javascript is actually tagged as "[DEPRECATED]" in the HTML spec
(which will have to be after v5.0) then Microsoft might care. I doubt
anyone should be overriding the HTML spec with an informational RFC.
So, for now, use text/javascript until the HTML spec says it has been
deprecated (and until whenever the web browsers catch up).