How far do you go to support JS features in webapps when JS is disabled?

Given that a lot of webapps use JS libraries and rely heavily on JS for certain features to function, how far do you go to make features of the webapp work when JS is disabled? (Beyond just making sure to prevent exploits if JS is disabled) Or if something’s complex enough, do you just slap a warning/error message on the page saying “this webapp needs javascript enabled to run”?

Things like this:

http://ficml.org/jemimap/style/color/wheel.html

Turn off JS, and pretty much everything goes away. No NoScript messages.

I didn’t really plan it, but my latest web apps do work without JS even though they use it pretty heavily in the UI. Since I convert structures like ordered lists into dropdown menus with JS, if JS is gone, the menus / date pickers / etc still work, they’re just ugly.

The key is unobtrusive javascript. Make all your javascript unobtrusive, and that will get you 95% of the way there, just by it’s very nature. With JS disabled, the user will have to go through more screens/page loads and may not get as much help (javascript datepickers, etc), but they will still be able to use your application.

Note that unobtrusive javascript comes in two flavors:

  • Progressive enhancement
  • Graceful degradation

For a comparison between the two please read this article.

In case you’re wondering, I subscribe to the the progressive enhancement theory :slight_smile: