W3C home > Mailing lists > Public > public-html@w3.org > April 2009

Re: [Bug 6684] Disregard of RFC 4329 and IANA MIME Media Types

From: Philip Taylor <pjt47@cam.ac.uk>
Date: Thu, 02 Apr 2009 12:03:52 +0100
Message-ID: <49D49B98.5030104@cam.ac.uk>
To: HTMLWG <public-html@w3.org>
CC: Smylers@stripey.com
Smylers wrote:
> Michael A. Puls II writes:
> 
>> 1. IE needs to be patched for <!DOCTYPE html> so that <script
>> type="application/javascript" and other types mentioned in the RFC
>> execute the JS code.
> 
> To clarify, in current IE <script type="application/javascript"> isn't
> interpreted as JavaScript?

Yes. http://philip.html5.org/demos/js/jstype.html has various examples. 
IE8 (and IE8 in IE7-mode) executes the script when <script type> is:
   text/javascript1.1
   text/javascript1.2
   text/javascript1.3
   text/javascript
   text/jscript
   text/ecmascript
   text/livescript
and no other tested value.

"text/javascript" and "text/ecmascript" appear to be the only types that 
work in all of IE, Firefox, Opera and Safari.

(The HTTP Content-Type of scripts is ignored entirely, as far as I'm 
aware. Some old (September 2007) data at 
http://canvex.lazyilluminati.com/misc/stats/scripttypes2.html indicates 
the most common Content-Type is "application/x-javascript", followed by 
"text/html", then "text/javascript". 
http://canvex.lazyilluminati.com/misc/stats/scripts2.html indicates that 
<script type> is almost always "text/javascript".)

-- 
Philip Taylor
pjt47@cam.ac.uk
Received on Thursday, 2 April 2009 11:04:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:02 UTC