[whatwg] <nostyle> consideration

Aryeh Gregor Simetrical+w3c at gmail.com
Tue Jun 16 03:51:05 PDT 2009


On Mon, Jun 15, 2009 at 7:23 PM, Kornel Lesinski<kornel at geekhood.net> wrote:
> <noscript> is a very poor solution, and <nostyle> would be too. You should
> use graceful degradation/progressive enhancement instead (in both cases).

Graceful degradation is not necessarily possible with JavaScript.  For
instance, consider a real-time game written in JavaScript.  It would
be impractical to refresh the page often enough for the game to be
playable using server-side scripts alone (not to mention having to
rewrite the game in a server-side language).  There's nothing to do in
such a case except inform the user that they need to enable
JavaScript.  Of course, this case is atypical.

Sometimes <noscript> can be used for graceful fallback, too.  For
instance, if a script normally generates an element dynamically when
needed, the element might be placed statically inside <noscript> so
that it always appears if script is disabled.  (For instance, a
"Nationality" form in a field that only appears if a radio control is
changed from the default of "U.S. Citizen".)  Without <noscript>, the
only way I know of to allow graceful fallback is to do something like
hide the element onload, which will make it briefly visible.



More information about the whatwg mailing list