W3C home > Mailing lists > Public > www-html@w3.org > September 2000

Re: Registration of script MIME types

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 16 Sep 2000 16:52:06 +0200
Message-ID: <000e01c01fed$d0eb36c0$a72190d4@de>
To: "Stephanos Piperoglou" <stephanos@webreference.com>
Cc: <www-html@w3.org>
* "Stephanos Piperoglou" <stephanos@webreference.com> wrote:
| The problems are that
|
| (a) text is a bad top-level type for script languages

Yes.

| (b) current practise is divided. Most software (e.g. Netscape, Apache)
| calls javascript application/x-javascript.

Apache does this according to the Netscape JS Guide

| IE only likes
| text/javascript, text/jscript, and text/ecmascript.

Where text/javascript is also used by Netscape for <style> i.e. JSSS.

| Nav mostly doesn't
| care, but under certain circumstances only executes
| application/x-javascript. I did some tests with this stuff back then
| and I don't remember the exact results, but Navigator doesn't like
| scripts being called text (and rightly so; expected behaviour for
| unknown text types is to display them raw, not execute them!).

Netscape knows text/javascript (at least my 4.5). This should be a must
according to HTML 4 where text/javascript is used.

| The
| catch is that both browsers execute scripts with no TYPE attribute,
| but will refuse to execute scripts with such an attribute.

Hm, i think this is only true for old browser versions.

| But TYPE is
| required by HTML4 (IIRC). So you're screwed, basically.
|
| (c) These types aren't registered
|
| We can register these languages with IANA, but unless we use one of
| text/javascript, text/ecmascript or text/jscript, IE will refuse to
| execute scripts with the correct content type since it only groks
| these.

Registering these types wouldn't break any website.
If these MIME types were registered we wouldn't have this problem.
If these types stay unregistered, we will have this problem in the future.

| I have no idea how to fix this, since it's basically a bug in IE.

No. It's Netscapes fault not to register a MIME type for javascript and use
application/x-javascript instead. The use of non-standard (as marked by the
x-) MIME types in a world wide medium is strongly discouraged but Netscapes
forces us to do so.

This problem will rearise, if ECMA does not register a correct MIME type for
ecmascript.

--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981ASK ° http://www.websitedev.de/
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote +{i}
    --- All I want for Christmas is well-formedness -- Evan Lenz ---
Received on Saturday, 16 September 2000 10:54:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:44 GMT