W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2009

[whatwg] <nostyle> consideration

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 16 Jun 2009 06:51:05 -0400
Message-ID: <7c2a12e20906160351t40dd9cb9gb7bd9faaf422e9e8@mail.gmail.com>
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.
Received on Tuesday, 16 June 2009 03:51:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:13 UTC