Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should your website work without JavaScript [duplicate]

We're developing a web application that is going to be used by external clients on the internet. The browsers we're required to support are IE7+ and FF3+. One of our requirements is that we use AJAX wherever possible. Given this requirement I feel that we shouldn't have to cater for users without javascript enabled, however others in the team disagree.

My question is, if, in this day and age, we should be required to cater for users that don't have javascript enabled?

like image 926
lomaxx Avatar asked Jul 05 '09 13:07

lomaxx


2 Answers

Coming back more than 10 years later, it's worth noting my first two bullet points have faded to insignificance, and the situation has improved marginally for the third (accessible browsers do better) and fourth (Google runs more js) as well.


There are a lot more users on the public internet who may have trouble with javascript than you might think:

  • Mobile browsers (smartphones) often have very poor or buggy javascript implementations. These will often show up in statistics on the side of those that do support javascript, even though they in effect don't. This is getting better, but there are still lots of people stuck with old or slow android phones with very old versions of Chrome or bad webkit clones.
  • Things like NoScript are becoming more popular, so you should at least have a nice initial page for those users.
  • If your customer is in any way part of the U.S. Goverment, you are legally required to support screen readers, which typically don't do javascript, or don't do it well.
  • Search engines will, at best, only run a limited set of your javascript. You want to work well enough without javascript to allow them to still index your site.

Of course, you need to know your audience. You might be doing work for a corporate intranet where you know that everyone has javascript (though even here I'd argue there's a growing trend where these sites are made available to teleworkers with unknown/unrestricted browsers). Or you might be building an app for the blind community where no one has it. In the case of the public internet, you can typically figure about 95% of your users will support it in some fashion (source cited by someone else in one of the links below). That number sounds pretty high, but it can be misleading; turn it around, and if you don't support javascript you're turning away 1 visitor in 20.

See these:

  • https://stackoverflow.com/questions/121108/how-many-people-disable-javascript
  • https://stackoverflow.com/questions/822872/do-web-sites-really-need-to-cater-for-browsers-that-dont-have-javascript-enabled>
like image 51
Joel Coehoorn Avatar answered Sep 20 '22 14:09

Joel Coehoorn


You should weigh the options and ask yourself:

1) what percentage of users will have javascript turned off. (according to this site, only 5% of the world has it turned off or not available.) 2) will those users be willing to turn it on 3) of those that aren't willing to turn it on, or switch to another browser or device that has javascript enabled, is the lost revenue more than the effort to build a separate non-javascript version?

Instinctively, I say most times the answer is no, don't waste the time building two sites.

like image 28
Ken Pespisa Avatar answered Sep 19 '22 14:09

Ken Pespisa