Should I bother to develop for JavaScript disabled?
I feel that my time is better spent developing for the majority.
Should I bother to develop for JavaScript disabled?
I feel that my time is better spent developing for the majority.
There's a web-design philosophy known as Progressive Enhancement which is one you should consider. The idea is you build a basic site that is usable and workable, and then you layer onto this enhancements like jQuery and browser-specific stuff to "enhance" it. This way you get a site that works for everybody and looks nice for the majority.
If that doesn't convince you, then consider other reasons for having a site work without javascript:
It is more SEO friendly. If your site relies on JS for content and links then chances are search-engines will be ignoring large chunks of it.
Imagine you are an eCommerce site selling widgets. Now, even if only 5% of your customers disable javascript, that is a potential sales loss of 5%. Is it worth losing customers over?
Don't discriminate against the disabled. Relying on javascript means your site is not accessible and, in some cases (such as government/public sector sites), you could be breaking the law by discriminating against people.
For one, I disagree with the people out there who insist that everything should function without Javascript. It is nice to code to the lowest common denominator in a lot of cases (for example, I would be really pissed if my bank's site required Flash or some such nonsense.) But realistically almost everyone has Javascript enabled these days and if used properly the resulting sites can be quite spectacular and useful! (I mean, let's see how nice Google Maps is when Javascript is turned off...)
However, this should not absolve you from at the very least ensuring that your page fails gracefully if Javascript is not present. Never EVER leave your users staring at a half loaded, broken page with no indication as to what went wrong. Just ask yourself: Would I rather spend 2 minutes coding up a "This page requires Javascript" message or receive 10 emails daily from users telling me that my page is broken because they have noscript enabled?
Yes, you should.
If you perceive this as something that requires extra effort, you may be doing it the other way around.
Develop your pages to work without JavaScript first then add JavaScript-based improvements, Ajax effects and so on. They will work if JS is supported/enabled, otherwise your pages will degrade gracefully.
And please, don't develop the pages where:
The entire content is pulled from the database by JavaScript
The markup completely falls apart because the elements glued together and put into the right places by JavaScript not by CSS
Links in the navigation and in the body are not functioning without JavaScript (unless it's some framework like ASP.NET which relies on JavaScript for a reason)
It's just against the spirit of the web and against the common sense.
P.S. Spoken by a user of the NoScript.
As a developer I no longer worry about 1% of users who turn off Javascript. It is too time consuming and development time is too expensive to waste on such nonsense. AJAX saves an incredible amount of bandwidth which turns directly into $$$ savings, which makes profits higer. If I lose oneor two potential users of the site for every 100 users, those one or two lost users will cost a lot more in development than the potential income of they could ever bring in.
Try turning off Javascript and logging into Facebook, it becomes a very broken website after that. If it's good enough for Facebook, its good enough for me.
Personally I use the NoScripts Firefox plugin when browsing, and I encourage others to use it to. On all the family PCs I maintain NoScripts is one of the mandatory bits of software I install. I set it up with a whitelist of the basic email and banking websites along with the popular social & video sites and explain to them how the temporary allow works. Judging from the popularity of this plugin I think there is a pretty good portion of people who use it.
At the very least I expect navigation functionality to work without scripts. If you have something specific like video that requires scripts then fine, but display a nice placeholder that says "scripts are required to view this video".
Making your navigation rely on scripts is a big mistake though. In many cases it will make me bounce off the site in disgust. An even bigger mistake is to have part of your site or navigation just completely disappear when scripts are disabled. Unless you highlight the fact that something is missing there's a good chance I won't even notice so will just leave your site thinking it wasn't there. Also, a full screen message that just says "this site requires scripts" won't get you very far, I need to see some level of content before I trust you enough to allows scripts.
Finally, don't forget that it's not just desktop PCs that are browsing your site, but mobile browsers are increasingly popular. Although mobile JavaScript support is getting better it's no where near perfect so unless you are going to heavily test all the different mobile browsers I would suggest you search the mobile version of your page pretty much scriptless.
A site that doesn't work correctly without JavaScript should clearly notify the user. As much as possible should be made to work correctly without JavaScript. There are certain cases where this won't be possible, highly dynamic sites built on layers of AJAX and remote fetches are one of them. This doesn't mean that it's okay to show a blank page if I have JavaScript disabled.
Graceful degradation is extremely important, and it doesn't just apply to JavaScript, it applies to everything you code. Valid HTML markup, valid CSS, server side validation of everything.
It depends on the site and who will be using it.
Is the site public or is it an intranet or a site that will only be available to certain customers? You will probably encounter users without JavaScript in the public. If it will only be used by clients can you tell them you only support JavaScript enabled?
Is SEO a consideration or is the entire site behind a log-in screen or SEO is it otherwise not a factor? It is much easier to optimize for search engines if there's no JavaScript.
Will the site ever be used on mobile browsers? Mobile browsers often have no or poor JavaScript support.
You should also realize that JavaScript can make it difficult for screen readers to process your site and has other potentially negative accessibility considerations.
Users of text based browsers (e.g. lynx) also have little or no JavaScript support.
You have to look at your site and your audience and decide if you need to support users who have JavaScript disabled. You also have to see if it's even possible not to use JavaScript. If you're making an advanced Web Application and need things like webcam and microphone support it may be impossible to not use JavaScript.
If you decide that you need to support users without JavaScript then you can still use JavaScript. You should just make the website still functional without it. This is called progressive enhancement, it should gracefully degrade if there is no JavaScript support.
If you decide to require JavaScript you should notify your users (using the <noscript>
tag) that you are doing so.
Can I recommend an article from "A List Apart"?:
Progressive Enhancement with JavaScript
...We’ve reviewed the mindset needed to implement progressive enhancement in JavaScript and several techniques through which to do it. We’ve also touched on the concept of unobtrusive scripting and learned a little about how to manage the inter-relationship of CSS and JavaScript.
When you combine the general approach with that article with useful tools like JQuery (or Prototype, or whatever your JavaScript framework of choice is), it's really trivial to apply the JavaScript behavior after the fact.
There are several types of browsers out there that still do not have JavaScript or at least very limited JavaScript support. Not to mention that rule #1 for both WCAG and section 508 compliance (accessibility for non-US folks) is that the sight does not depend on a scripting language to function. If the page reloads every time I make a change, but it still allows me to make changes it is functioning. The AJAX layer on top of the base site makes it possible for me to do the same without the page reloads.
Top reasons I can see for supporting no JavaScript users are:
Please, if you are going to require cookies and JavaScript on your site for it to function, then properly do your due diligence to avoid the following problems with the following:
(And that's just the short list)
When the solution isn't that hard, why not do it?
Also, while you're at your JavaScript fiesta, don't forget to support sane keyboard navigation.
On a site like this you will find many developers tell you how they have Javascript disabled so you should support progressive enhancement. In reality of the 5% of people who have Javascript disabled, 90% of them are developers and other tech geeks, they are not the general public. Most major sites do not support progressive enhancement. Have you tried to use Facebook without Javascript? They basically say go away.
< 5% of users disable javascript
According to BrowserStatistics, in 2008, only 5% of users had JavaScript turned off. The trend has steadily been declining so it's very safe to assume that now near 2011, that number is much smaller.
Downgrade Gradefully
Your site should never be broken - no matter if the users have JS on or off. Even if it's as simple as displaying a message that your site needs javascript turned on, you should make sure that your website renders and behaves in an acceptable, non-broken manner for those select few.
Reworking for non-JS users? Normally: No.
The ordinary developer has no need to create a non-javascript version in another language. However, if it is known that your clients have anti-javascript needs, then you obviously are forced to cater to it. (Even GMail has a no-JS version)
My thoughts:
Using javascript will always increase the surface area for attack, not just for you, but for your customers - almost everyone I know browses with NoScript, and this includes non-technical folks.
If I see an online shopping site that uses javascript badly I will not buy from them. I always first browse with javascript disabled, and if a site degrades gracefully I may be interested. If it is just broken I will usually assume the programmers also don't have the capability to deliver a secure shop platform.
It tends to slow everything down - despite being close to a major city, my broadband is slow enough without having to wait for some marketing idea to load. If a site takes more than 5 seconds to load basic content then I won't bother unless I have a real need.
Only on mission critical functionality
Generally its a good idea to "degrade gracefully". However I would I would only concentrate on mission critical parts of your web application, to cater for situations when JavaScript may not be available.
If its just "bells & Whistles" effects, then no don't bother. People who deliberately surf with out JavaScript will just have to make do a plain experience (hey that's their choice for not using Js)
Most of the answers here appear to highlight criticisms of standard websites using JavaScript in non-essential or hacky ways. But what about web apps? There are a ton of critical functions that cannot be achieved even remotely as effectively without JavaScript. Even something as simple as a basic word counter under a text area, or enabling/disabling an additional form question based on the answer to another. In this case is it not reasonable to build for the majority and degrade gracefully for the minority? Especially if you know that your user base is non-technical and unlikely to have JS disabled?
Things to consider:
AFAIK, search engine spiders don't like Javascript. You should have basic content and navigation without Javascript just for SEO.
Some websites may have rules for access by the disabled, either for legal reasons or for company policy. That is usually best accomplished with simple HTML as opposed to Javascript.
While most people surf with Javascript on nowadays, that isn't a guarantee for the future. The web is becoming increasingly hostile, and tools like NoScript may become more popular. Alternately, it's possible that more people will use devices with less capable browsers, although with some Android phones being fairly inexpensive this seems less likely. Graceful degradation may be a way of future-proofing the site.
Yes.
I'm not going to talk about people with NoScript, embedded devices, etc. Their share can be measured and then you can decide if revenue decrease caused by annoying e.g. 0.5% users worths implementing a solution for them.
But there are other reasons to follow Progressive Enhancement principle, and they are often more important.
100% users can't execute javascript before scripts are loaded. If site can work without js, it can be loaded faster for the first-time visitors, visitors with empty cache and for all visitors after js code updates.
Sites that can work without js are more reliable. Javascript error breaking a website is an architectural nightmare. More info on this and related problems: http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs
It is easier to stick to Progressive Enhancement than to implement SEO-friendly javascript-only site.
It is easier to write automated tests for site that doesn't require javascript to work.
It is actually quite easy to follow Progressive Enhancement principle so why don't follow it?
Depends on the answer to a single question:
"Is the cost of supporting users with Javascript disabled greater than or less than the money lost by not supporting those users?"
Say your website has a lifespan of 3 years before needing to be rebuilt, it costs £30,000 to build for 'rich clients', and you add another £10,000 to support non-javascript users (of which we'll assume there are 5% of)
If the missing 5% of users would have spent more than £10,000 - do it. If they wouldn't, don't do it unless you're legally required to.
This is more of a business/economical decision than a technical one.
No, you shouldn't
With two exceptions:
For desktop and touch phone websites, Javascript provides an amazingly rich user experience. There is a reason all top websites make extensive use of AJAX and Javascript. All current browsers support it. Embrace it!
As someone who has sweated in the past to make an entire website work with Javascript disabled, I can assure anyone that they'll end up degrading the experience for the 99% in order to please the 1%.
Rather just stick in a NOSCRIPT tag that tells those users to enable Javascript. They'll be used to it.
It depends very much on your target market. If your target market is non-techs, you're pretty safe ignoring javascript disabled. However, if you're after techies, well, the majority of the ones I know have javascript disabled... You're going to need to support them unless you want the small portion of techies that allows javascript (I'm one of the minority, I let javascript run on my machines). :-)
JavaScript disabled is extremely important and you should support it. The porn industry is notorious for spamming users with rogue pop-ups. Disabling JavaScript is pretty much required if you navigate into this territory.
Do you really want to force users to constantly turn JavaScript on/off as they go from sites of questionable repute to your app?
Why would you use JavaScript? It's not necessary for anything useful anyway. Add it for silly effects if you want, but make it work for us sitting on a new but slow netbook/iPod/whatever wanting it to work a little faster (and safer) by turning of JavaScript!