W3C home > Mailing lists > Public > www-validator@w3.org > May 2002

Re: Scripts...

From: Thanasis Kinias <tkinias@optimalco.com>
Date: Fri, 10 May 2002 18:50:34 -0700
To: Ville Skyttä <ville.skytta@iki.fi>
Cc: Liam Quinn <liam@htmlhelp.com>, Evelyn Hunter <boots@aloha.net>, www-validator@w3.org
Message-ID: <20020510185034.C12807@glaux.ph.cox.net>
scripsit Ville Skyttä:
> On Fri, 2002-05-10 at 23:47, Liam Quinn wrote:
> > > Um, since we are on the topic of Scripts, and not to diverge, but how on
> > > earth do you get JavaScript passed XHTML?  It wants a "type" and I don't
> > > know what "type will satisfy the validator and not kill the script.  Any
> > > ideas?
> > 
> > type="text/javascript"
> Maybe a nitpick thingy, but I'd rather not recommend using
> "text/javascript" since it is not officially registered in IANA [1].
> "application/x-javascript" would IMHO be a better, more established
> choice, that's what for example Apache sends by default.  See also [2].

How come no one's ever registered a MIME type for JavaScript?

Ville has a very good point here.  I have to admit I've been blindly
following the HTML4 spec on this, but I should not be comfortable
advocating a counterfeit MIME type.

In re www-validator, the Validator shouldn't care so long as the value
of `type' is CDATA, right?  It doesn't care that a value of `href' is
"javascript:B.S." . . .

Might it be a desirable feature to check that `href' has as its value a
valid URI, that `type' has as its value a valid MIME type, or that
`lang'/`xml:lang' have valid language codes?  It wouldn't be an error,
since the DTDs don't specify (except in comments) anything but CDATA,
but a warning might be useful.

Thanasis Kinias
Web Developer, Information Technology
Graduate Student, Department of History
Arizona State University
Tempe, Arizona, U.S.A.

Ash nazg durbatulūk, ash nazg gimbatul,
Ash nazg thrakatulūk agh burzum-ishi krimpatul
Received on Friday, 10 May 2002 21:52:01 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 November 2015 11:01:16 UTC