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

Re: Registration of script MIME types

From: Stephanos Piperoglou <stephanos@webreference.com>
Date: Sat, 16 Sep 2000 05:21:58 +0100 (BST)
To: Bjoern Hoehrmann <derhoermi@gmx.net>
cc: www-html@w3.org, www-svg@w3.org
Message-ID: <Pine.LNX.4.21.0009160506450.12115-100000@highnoon.spn>
On Sun, 10 Sep 2000, Bjoern Hoehrmann wrote:

> W3C documents refer several times to unregistered MIME types, for example:
> http://www.w3.org/TR/html4/interact/scripts.html
>   text/javascript
>   text/tcl
>   text/vbscript
> http://www.w3.org/TR/SVG/script.html
>   text/ecmascript

I brought this up a while ago, see:


And received a general shrug from all parties concerned about who
could fix this.

The problems are that

(a) text is a bad top-level type for script languages

(b) current practise is divided. Most software (e.g. Netscape, Apache)
calls javascript application/x-javascript. IE only likes
text/javascript, text/jscript, and text/ecmascript. 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!). The
catch is that both browsers execute scripts with no TYPE attribute,
but will refuse to execute scripts with such an attribute. 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

In other words, no matter what you do, if you use the TYPE attribute
in your pages, *some* browsers will refuse to execute your scripts
even though they can. I have no idea how to fix this, since it's
basically a bug in IE. It might have originated from a small mistake
in a non-normative section of the HTML4 spec, but it's basically
Microsoft's fault :-)

Stephanos Piperoglou                              <stephanos@webreference.com>
Maintainer, HTML with Style                    <http://webreference.com/html/>
  Visit HTML with Style for online HTML and CSS tutorials with step-by-step
   procedures and practical examples to help you author Web pages that are
 full-featured, standards-compliant and backwards-compatible, tools to make a
 Web author's life easier, software reviews, opinions, industry news and more
Received on Friday, 15 September 2000 22:21:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:54 UTC