Michael Winter wrote:
The application/ecmascript and application/javascript MIME types were
only recently introduced, so this means that most (all?) user agents
will not recognise them for the time being.
Mozilla and Opera recognise application/javascript. I think IE is the
only major browser that doesn't, but I'm not certain about Mac and Linux
browsers. I don't know about application/ecmascript support.
As such, you should continue to use the (officially obsolete) text/javascript type.
Yes, even though text/javascript is now deprecated, it's the only one
that can be safely used in HTML while IE6 is still around. However,
IIRC, IE obeys the type attribute regardless of what the server sends.
Although, it is generally good practice to use the same MIME type in
both places anyway, you can use:
<script type="text/javascript"></script>
and send this in the HTTP headers:
Content-Type: application/javascript; charset=UTF-8
(don't forget to send the correct character encoding information, it
must match the encoding of the file)
--
Lachlan Hunt
http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox