W3C home > Mailing lists > Public > www-validator@w3.org > June 2003

Re: Problem Validating SCRIPT Element with TYPE Attribute

From: Ville Skyttä <ville.skytta@iki.fi>
Date: 23 Jun 2003 13:50:50 +0300
To: www-validator@w3.org
Message-Id: <1056365450.23164.43.camel@bobcat.ods.org>

On Sun, 2003-06-22 at 17:22, Jim Ley wrote:
> "Ville Skyttä" <ville.skytta@iki.fi>
> >
> ><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.

I would agree with you if they had treated text/javascript the same
way.  AFAICT, that's still used to label JavaScript, not JScript or
ECMAScript.

> >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."

This discussion has popped up every now and then.  The lack of a
registered JavaScript media type provides room for subjective opinions.

Everyone's who must use JavaScript is free to pick their poison; they
can choose to directly violate the media type RFCs, use stuff that is
discouraged by them or to dismiss the W3C HTML recommendations eg. by
omitting the type attribute from the <script> elements (dunno how that
works in browsers, though) :)

> >[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?

I wonder what are you specifically referring to here, but I don't think
that W3C has to have anything to do with JavaScript MIME type
registration.  But recommending (or using as an example, don't remember
right now) text/javascript in some HTML recommendations was a bad choice
anyway.  IMO, YMMV etc.

More related info: :)
<http://lists.w3.org/Archives/Public/www-svg/2002Aug/0008.html>

-- 
\/ille Skyttä
ville.skytta at iki.fi
Received on Monday, 23 June 2003 06:50:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:09 GMT