Re: Problem Validating SCRIPT Element with TYPE Attribute

"Ville Skyttä" <ville.skytta@iki.fi>
>On Sat, 2003-06-21 at 14:26, Jukka K. Korpela wrote:
>> To conclude, if you wish to comply with the syntax specified in HTML
>> recommendations, and thereby pass validation against a doctype specified
>> there, and you use a script element, you have to violate a widely
>> deployed, standards-track Internet protocol by the IETF.
>
><script type="application/x-javascript"> would be most "correct" [1],
>and was the generally accepted best practice too until MSIE 6.something
>decided to ignore all scripts with type="application/x-javascript".

I believe that MSIE is correct here, the application/x-javascript is an
experimental mime-type invented by the Netscape people to label JavaScript,
and since MSIE does not support JavaScript (which has many extensions to the
ECMAScript standard that JScript is compliant to.) it is right not to honour
it.

>See <http://www.robinlionheart.com/stds/html4/scripts.html#type> for
>more related info.

Hmm, but it says that application/x-javascript is the correct type to use,
despite the fact that it's a private format and RFC2046 says "publicly
specified values shall never begin with "X-""
and RFC 2048 says: "it should rarely, if ever, be necessary to use
unregistered experimental types, and as such use f both "x-" and "x." forms
is discouraged."

>[1] Even better if there would be a registered MIME type for
>    (Java/ECMA)Script.

Of course, but this is the W3 remember who don't seem to care one jot for
mime-type registration for their own recommendations why should we expect
them to be consistent with other peoples?

Jim.

Received on Sunday, 22 June 2003 10:27:35 UTC