Does your website still need to be functional with Javascript disabled or unsupported?

We have recently been reviewing the amount of development time spent on projects, and have identified one area where a fair chunk of extra time is spent for relatively little gain: Ensuring that web sites are 100% functional with Javascript disabled. The general concensus on the web is that year on year, the number of people (even those technical in nature that browse w3schools) with javascript disabled is falling – but is this a decent reason to consider removing the true graceful degradation that most front end developers have been obsessed with for the last few years?

The main reason for Javascript being used to progressively enhance the user experience rather than be a fundamental ‘requirement’ is cited as making the site accessible to as many people as possible. Importantly, many mobile devices don’t fully support Javascript (Smart Phones tend to, but I’m talking true mobile phones here) and screen readers certainly don’t support Javascript. Realistically, the percentage of visitors falling in to the ‘browsing on a mobile device’ or ‘using a screen reader’ will be low, and often low enough for a client (or yourself) to make the judgement “we’re not going to bother”. It is important to consider that there are advantages to graceful degradation other than making the site as accessible as possible:

Google, Bing, and A.N.Other search engines – search engine spiders are still fairly basic creatures. If your site navigation doesn’t load a new page but instead loads new content in using Ajax when you click the ‘About’ link, how are search engines going to find and index your ‘About’ page content if the site is not navigable without Javascript? It’s quite simple to make things like this degrade; if Javascript is disabled the link should go to index.php?page=about rather than nowhere. Importantly, many clients think that google is the most important visitor; if they’ve forced you to put lots of keywords at the bottom of the site despite your pleas for them not to then they wouldn’t be very pleased to find out that the search engines can’t get any further than your home page.

Application Design – Designing the application so that it works without Javascript and then adding Javascript afterwards often makes the system architecture much more understandable and ‘rigid’. In fact, if done correctly, this can speed up the Javascript implementation process. Looking back to our previous example, index.php?page=about will load a completely new version of the page with header, footer and all the bells and whistles. How about, if you click the ‘About’ link with javascript enabled, it will load index.php?page=about but through AJAX? Using HTTP_X_REQUESTED_WITH we can detect that it was requested through AJAX and serve just the ‘meaty’ bit of the page; ie the content that is changing, rather than the whole page. Does this really add much time to the development process? In my opinion, no it doesn’t!

Of course, the user experience will not be identical without javascript, but in my view it is still important to support users with no support for the language on their device, or even those that choose to browse without it. It is my view that you can treat support for when Javascript disabled in the same way as many designers treat support of Internet Explorer 6: The site should work, but it doesn’t necessarily have to be perfect. Sticking to this general guideline will not add huge amounts of time to the development time of a project, and if it does… you should take a look at how the system is designed, because it really shouldn’t.

2 thoughts on “Does your website still need to be functional with Javascript disabled or unsupported?”

  1. This is the point where I like to remind people that one small error in your JavaScript can potentially prevent all scripts on the page from functioning, at which point you’ll be glad that you put a few small fall-backs in place. :-)

  2. Tom, one other thing is.. if you’ve a slow internet connection and the whole page hasn’t loaded yet and you click a button.. the Javascript event handler probably hasn’t been attached yet. The last thing you want is a hard failure in this situation!

    Also, remember that a lot of people add the event handlers once the whole page has loaded and not when the DOM is ready… which means the time before the JS will ‘work’ is even longer…

Leave a Reply

Your email address will not be published. Required fields are marked *