Re: Empty script tags cause trouble.

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 UTC