Dispelling the Myths of Javascript Degradation

—Thursday, October 13 2005

I’ve been working on an application that makes heavy use of Ajax, so much so, that without Javascript enabled the application is useless. I’ve struggled with the issue of degradation and have decided not to do so. While I’ve read some great articles on the hows and whys, we should stop for a moment and ask ourselves who these users are we’re excluding? We need to dig a little deeper and question the who’s and whys.

According to thecounter.com, the number of users with Javascript disabled is up from previous months. What’s going on here? Statistics are merely measured assumptions, but at the moment, they’re all we have to go on.

Then there was the man who drowned crossing a stream with an average depth of six inches."

Does your Mom know what Javascript is?

If your Mom’s like mine, she’ll have no clue what this Javascript is you speak of and she’ll certainly not know how to disable it. It’s true; you’ll find that most people who don’t know what Javascript is will not know how to disable it. This tells me those users who do have Javascript disabled can’t be the normal non-techie users like my dear Mom.

Who disables Javascript and why?

My guess is most of the time Javascript is disabled, it wasn’t actually disabled at all. People will rarely disable Javascript, and why would they, it renders most of the web useless. Javascript could be disabled for a number of reasons, but someone disabling it will likely be at the bottom of the list.

Those who choose to disable Javascript

If someone disables Javascript then you can bet they know what it is (obviously huh?). They could disable it for a number of reasons; security and annoyances are more than likely the top two contenders (Anyone still disable right clicks?).

If someone has Javascript disabled for security reasons, they probably have cookies disabled too. Does your application degrade for those who’ve disabled cookies? Particletree’s store doesn’t, Jeremy Keith’s theme system doesn’t work fully to name a couple.

Why are cookies and Javascript any different in this context, they are both a means of enhancement. Why do we accommodated for one and not the other? I don’t know the answer, perhaps one of you do.

Javascript is also the culprit behind a majority of internet annoyances. Some have went so far as to use it as a means to spread viruses. If I find myself visiting a site which could be questionable, or is known to have annoyances–I’ll disable Javascript. I’m betting there are a few more people who do this and this kind of behavior helps keep that 10% number at 10%. It skews the statistics higher than they actually might be.

Those who have no choice

Not everyone who has Javascript disabled has manually disabled it. They could possibly be using devices which have no support for Javascript or they’re working in a restricted environment. Unfortunately I couldn’t find any good resources to help me identify what these devices could be, so I’ll make some assumptions myself and throw out a list of potentials:

  • Web TV devices
  • Handhelds
  • Lynx
  • Corporate restrictions
  • Screen Readers/Accessibility devices

Most of these are a secondary means of browsing the web (excluding the accessibility devices which are a requirement for those with disabilities). While your at work, you could be browsing in a restricted environment; Those using handhelds are probably not using them as there primary source for browsing the web.

Javascript isn’t the only problem that’ll surface under these conditions. Poor support for CSS and XHTML are also problems you’ll face. If your providing fallbacks for Javascript, are you providing fallbacks for these problems as well?

Is it really just a matter of ethics

I think ethics drives the decision to degrade more than business benefits. Acceptance from your peers, fear of being called out for not practicing what your preaching, or judgement passed on your talent as a web developer are all reasons some choose to degrade. There are also those of us who do it just because we can, or we choose to do so as a learning experience.

I recently blogged about Particletree and their Treehouse publication. Ryan published an article entitled “The Hows and Whys of Degradable Ajax” explaining the method they used to ensure all of their users would have a flawless experience.

While working on Particletree's shopping cart system for our magazine, we decided that we wanted to create a flawless user experience for all users without having to sacrifice the added user interface benefits provided by Ajax goodness.

Treehouse is a publication for web developers and I believe 11 times out of 10 their target market would have Javascript support. I’m sure they we’re aware of this when they decided to go the extra mile. There was no added business benefit I can find to justify the reason for degrading. Does this mean it was ethics? Hopefully Ryan will elaborate on this question a bit.

Should you degrade

I’ll leave that answer up to you, but you should probably ask yourself a few questions first.

  • Realistically, how many of your users will be attempting to use your application/website with Javascript disabled?
  • Do the business benefits outweigh the cost in time, money and sanity?
  • Is Javascript the life-blood of your application, and without it, it wouldn’t be the same application.
  • Are you prepared to identify and support other problems that are likely to exists if a user has Javascript disabled?

Recapping the finer points

  • Non-Technical users will not disable Javascript.
  • If a user doesn’t have Javascript support, this probably isn’t the only thing you’ll need to accommodate for.
  • According to thecounter.com, support for Javascript is down from previous months.
  • Conditions where a user doesn’t have Javascript support are secondary methods for browsing the web.
  • Statistics are skewed
  • Ethics play a role in degradation

Update: [Ryan has responded][rr] and there is also a discussion taking place at Particletree.

Update Again: [Jeremy Keith][jka] has responded as well.
[rr]: http://particletree.com/notebook/why-go-degradable/index.php
[jka]: http://domscripting.com/blog/display.php/25