On Tue, 6 Apr 2010, James Kerr wrote: > Ian Hickson <i...@hixie.ch> wrote: > > On Mon, 5 Apr 2010, Swampert wrote: > >> In your HTML5 draft standard, the default value for type attribute in > >> script element is "text/javascript". While according to RFC 4329, the > >> MIME type "text/javascript" is obsolete, the proper MIME type for > >> JavaScript is "application/javascript" or "application/ecmascript". > > > > The type everyone uses is text/javascript. What's the point of using > > application/javascript? What problem does it solve? > > I believe this has to do with character encoding issues and is the same > reason that application/xml is preferred over text/xml. MIME types in > the text/* set apparently have a default encoding of US-ASCII which I > can imagine may throw up conflicts in some situations given that the > primary and generally accepted encoding for XML and HTML documents (and > increasingly other applications in general) is Unicode based.
On Tue, 6 Apr 2010, Anne van Kesteren wrote: > > In theory this is correct. In practice nobody follows this outdated > default encoding requirement. What Anne said. In practice, text/* doesn't default to anything, it works just like application/* -- it's different for each subtype. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'