ji*@jibbering.c om (Jim Ley) wrote:
by virtue of having noscript, it's clear that the author
is relying on the script working, something that is never guaranteed.
<NOSCRIPT/> should be removed.
(I wonder why people use notations like <NOSCRIPT/> - maybe because
slashes make _everything_ better? :-) )
The HTML 4.01 specification says, somewhat oddly,
"The NOSCRIPT element allows authors to provide alternate content when
a script is not executed. The content of a NOSCRIPT element should only
be rendered by a script-aware user agent in the following cases:
- The user agent is configured not to evaluate scripts.
- The user agent doesn't support a scripting language invoked by a
SCRIPT element earlier in the document."
This looks self-contradictory, isn't it? If all SCRIPT elements contain
scripts in a language supported by the browser, and the browser is
configured to execute scripts, then the latter part says, very clearly,
that a browser must not render NOSCRIPT content. No matter what happens
when the browser tries to execute the scripts.
But apparently the solution is that the first sentence is just sloppy
language and should be ignored, or interpreted so that "a script is not
executed" _means_ what the text says later.
As far as I know, browsers deal with it even more simplistically. They
render NOSCRIPT content if and only if configured not to execute
scripts. And in a sense this is much simpler.
But you're right in saying that authors _expect_ scripts to work. On
the other hand, what could they do? NOSCRIPT is not supposed to solve
all the problems in the world, or even all the problems with scripts.
Just some of them.
The NOSCRIPT element is poorly designed, and so is SCRIPT. For example,
if you wish to include HTML elements that are present only when
scripting is enabled (e.g., a button that works via scripting only),
you need to take the clumsy way of generating it with document.write( ).
But NOSCRIPT is occasionally useful. For example, if a page essentially
relies on JavaScript being enabled, it is better to say that than to do
nothing about the problem, and NOSCRIPT lets the author do that without
disturbing people who have scripting enabled.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html