W3C home > Mailing lists > Public > www-html@w3.org > February 2002

Re: Empty script tags cause trouble.

From: William F. Hammond <hammond@csc.albany.edu>
Date: 16 Feb 2002 13:23:32 -0500
To: W3C HTML Specification Discussion <www-html@w3.org>
Message-ID: <i7adu9xp3v.fsf@pluto.math.albany.edu>
Hi Christian --

> > <script type="text/javascript" src="somescript.js" />
> >
> > While the normal method works as expected:
> >
> > <script type="text/javascript" src="somescript.js"></script>

   <employer:beware>
   
   Power users browse the network with clientside scripting disabled
   because they don't want to be hassled by script mayhem.
   
   If your content providers are allowed to write scripts, many of
   your logged hits will represent unseen content.
   
   Moreover, much of that scripting has no real value to you.
   
   </employer:beware>

> > 1: a bug in a lot of editors and even browsers
> > 2: a bug in the w3 validator
> >
> > Or might there be other things I didn't think of?
> 
> 1 is right.

Perhaps we can avoid using the term "bug" for behavior that was
correct if not robust at the time an application was released.  (1) is
right if the application is XHTML aware.  But most distributed
applications are still not.

> The EmptyElemTag for Script, <script type="text/ecmascript" src="..." /> 
> (Though not already a normal RFC, I prefer ecmascript over javascript, but 
> this is a personal preference), is correct. It's browsers and editors that 
> fail.
> 
> For compatibility with those bugs in browsers, it's required to use the 
> StartTag EndTag version.

Yes, if the tag is _not_ defined-empty.  But we may be misunderstood
unless we also say that if the tag is defined-empty, then the
opposite.  Example: <hr />

                                    -- Bill
Received on Saturday, 16 February 2002 13:23:39 GMT

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