Non-Javascript Browsers – Should Websites Support Them?

browserhtmljavascriptweb

Apparently less than 1% had javascript off in 2010:
http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/

So is it worth it to still support browsing without javascript?

For example:

Form submissions. Normally I would set up click or change events on form elements and just update the current page HTML from the response.
But if the user has js disabled, the form cannot be submitted, and it won't work.

If I have to take into consideration that the user has JS off, then I need to wrap my input elements within <FORM>, add a submit button and add additional mark-up on the current page to handle the form submission results…
Anyway there's a lot of extra work to do in this case.

Another example – replacing generic form elements with DIVS that you style to look like cooler input elements, and make them behave like generic inputs trough JS. Again, users without js won't be able to do anything with them.

Or a different example, the UI created by JS on page load.
Besides the fact that non-js browser won't display the UI, there's also a small problem with JS-capable browsers which will show a ugly UI until the page is full loaded and the JS gets to be executed.

Are these drawbacks important enough to take into consideration, when less than 1% of your visitors are affected by them?

Best Answer

First of all; I'd put some question marks on that 1% figure. How did they measure this in the first place? Most usage statistics are collected client-side, using (drum roll) javascript. Disabling javascript completely means you're not counting those users. Furthermore, most of the script-aware users use things like NoScript, which is far more sophisticated than a simple "turn all javascript off"; instead, there's a whitelist, a blacklist, and a per-case decision for the gray area. I use NoScript myself, and more often than not, I only allow those scripts on a site that it needs to function, while Analytics and other tracking sites are tossed on the blacklist. So I probably count as "javascript enabled", even though I default to "javascript off", and serving me something that looks broken until I enable Javascript makes a bad impression - enough to make me close the page within a second unless I know it has what I need.

But let's assume the 1% figure is accurate. The fact that some users browse scriptlessly isn't your biggest concern. You should also consider the following:

  • Accessibility. While you can write accessible javascript, it is very hard to get it right, and you need to test on a wide array of user agents and configurations. If, however, your site is written in clear semantic HTML and functions well without Javascript enabled, it is typically easy to get accessibility right.
  • SEO. Most search engine spiders don't execute Javascript, and if they do, they don't typically go all the way. So basically all content that you generate or pull in using Javascript is invisible to search engines.
  • Integration with third-party tools. One of the great things about HTML is that it is a well-defined, standardized textual data format. Thousands of tools can process it to perform all sorts of tasks, and the ability to transform and accumulate your content adds value to your site. If you rely on javascript to display it, most of these tools will break.
  • Security. While Javascript is not inherently insecure, moving application logic to the client has important security consequences, and it's easy to overlook issues.
  • Mobile devices. Not all smartphones have the processing power to run your javascript as smoothly as you'd need it; many mobile browsers don't even support the full feature set of a desktop browser's javascript engine; and the very nature of the device (small screen, limited input devices, touch screen rather than a mouse) may break quite a few javascript / DOM features you might take for granted.
Related Topic