24

If you have developed a JavaScript based website, is it worth doing the extra work to make it accessible for visitors who don't have JavaScript enabled?

  • What percentage of visitors are in this position?
  • Which browsers does it particularly affects?
  • Are mobile devices JavaScript enabled?
2
  • Depends. Do you value the blind? Do you value people with other disabilities? Does your website work without a mouse? Do you do any accessibility work?
    – Raynos
    Commented Jun 20, 2011 at 21:55
  • @Raynos It's a common myth that screen readers don't support Javascript. Modern screen readers function as addons to browsers, and can execute Javascript just fine! However, they may not recognize nonstandard UI elements (e.g, DIVs with click handlers) unless they're tagged with appropriate ARIA attributes.
    – user8879
    Commented Aug 22, 2014 at 19:53

6 Answers 6

13

According to http://visualrevenue.com/blog/2007/08/eu-and-us-javascript-disabled-index.html, data collected in 2007, 1.04% have it disabled in the EU, and 3.05% have it disabled in the US. The data is a little old but if you look at the trend set from 2006 to 2007 the number of people with it disabled is going down. By now the numbers could be lower.

Disabled JavaScript is really browser independent. All browsers allow you to turn JavaScript off but I believe they all default to having it on.

In general, I wouldn't worry about making your main version of your site work without JavaScript. Most people understand that in order to have a rich experience on the web they need it enabled.

Finally, as for mobile devices. The acceptance rate is lower I believe but I can't give numbers. In general you want to have a different version of your site for mobile browsers anyways because things like mouse over don't work well in mobile touch-screen browsers.

5

First ask yourself what the primary purpose of your site is. Is your site intended to sell widgets? Is it a discussion forum? Figure out what the primary function is. Once you've done that, make sure the users can do it without JavaScript enabled. It doesn't matter if they miss a few bells and whistles, but make sure users can perform that function without JavaScript.

For example, if your site is an eCommerce site, then a user should be able to browse, add a product to the cart and complete a checkout without JavaScript. Maybe they don't see a pretty animation on the home page, or they can't use some fancy search and filter stuff, but provided they can browse and buy you're good.

Or take Stack Overflow or another Stack Exchange site. The major thing is to browse, ask and answer questions. You'd want that to work without JavaScript. Maybe the user has to hand-type the Markdown because the editor doesn't work, or maybe voting doesn't work, but the user can still perform the main function of the site.

At the end of the day, we all have limited resources and deadlines. It's probably not worth making sure the whole site works without JavaScript, so invest time where you'll get maximum reward.

2

You want to be careful with this line of thought. Even a few percent could still translate to a large number of visitors. I've read that mobile devices do not run JavaScript as that would consume more battery power.

It's quite possible to build a site that works with JS and without. I recommend building without first, then adding JS with graceful degradation in mind. If the user has JS disabled, the content should still be available.

1

Depending on the website, it might be useful to consider individual features rather than the entire website. Are some features more important than others? Are any of them mission-critical for your users? If the structure of the website allows it, make the mission-critical features accessible without JavaScript, and decide what to do with each feature based on its importance.

0

Serve the client content only whenever possible for non-js devices/browser.

0

I have two pages, page X, which is a JavaScript-based image viewer, and page Y, which is a fallthrough to which the user is redirected by a <noscript> block in page X like this:

<noscript>
<meta http-equiv="REFRESH" content="0;url=page-y">
</noscript>

For various browsers the percentage of unique IP addresses which are sent to page Y by the <noscript> section look like this:

            User's JavaScript is off
Firefox           7.7%
MSIE             22.7%
Opera             5.7%
Chrome           12.1%

(This is based on very low numbers of hits but it's the only data I have.)

★ In case anyone cares, this is from a series of SQLite queries on my log database like the following:

select count (ip_address_id) from 
(select distinct ip_address_id from hit, user_agent, page, referrer 
where hit.user_agent_id = user_agent.user_agent_id
and hit.page_id = page.page_id
and referrer.referrer_id = hit.referrer_id
and referrer like '%page-x%'
and page like '%page-y%'
and user_agent like '%android%');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.