Anne van Kesteren: Weblog 4.2

Weblog on W3C, WHATWG, HTML, CSS, DOM, XML, HTTP and more.

The MIME type of JavaScript?

I recently saw an example where the type attribute of the script element had the specified value: application/x-javascript. This seems to be correct after some research. Cconclusion was that text/javascript is incorrect, since there is never specified a MIME type for JavaScript. Therefore there should be used prefix (x-), just like CSS (-moz or -mso). However IE (for Windows only?) doesn't support this (yet?). Resources:

I'm not sure yet, but since my JavaScript for the new design doesn't work in Internet Explorer for Windows I think this is what I should use. Anyone a thought about this? Maybe there are more resources?

29th August 2003

Browse through posts: main.

Comments

  1. application/rss+xml doesn't exist either, as far as I'm aware. As the specification itself uses text/javascript as an example, I'm willing to feign ignorance.

    Permalink · 2003-08-29 16:44:29 · Sean

  2. You are right. Some things just don't make sense to me. But it seems to be more valid and IE ignores it, so I will get less error messages in that browser.

    Permalink · 2003-08-30 08:59:49 · Anne

Comments are closed

Sorry, comments are closed at this time.