views:

569

answers:

14

When even mobile browsers have JavaScript, is it really necessary to consider potential script-free users?

+12  A: 

Yes.

People can (and do) browse with javascript disabled. If your site will work without users having to explicitly enable javascript for you, that makes them happy.

Exactly how relevant depends on your target audience, of course.

Adam Bellaire
especially if your target audience includes people using screen readers or other accessibility devices.
Ball
@Adam Bellaire - people do, but they shouldn't, given the choice.
karim79
@karim79 - Why are you telling me how I should browse? I didn't know browsers came with a moral imperative.
David Thornley
@David Thornley - I wasn't telling you (or anyone for that matter) how you/they should browse. My point was along the lines of '...don't turn off JS and expect everything to be as pretty'. I can't expect my car to perform as well if I take away 3 of its cylinders and power-steering - and I don't expect that the car company has accommodated for this in their design.
karim79
@karim79 - Okay, so you're suggesting graceful degradation, so I at least have an idea what I'm getting into when I enable Javascript. Fine with me.
David Thornley
The problem is with sites that *break* completely when JS is turned off. That was the whole point behind looking at web UI development more as "progressive enhancement", where you have a baseline level of functionality that is *improved* with JS enabled. Too many sites have assumed JS support from the beginning and painted themselves into a corner where it is absolutely, 100% required in order for any functionality to work. And that's a problem.
bigmattyh
+2  A: 

It depends on who your target audience is. I have JavaScript turned off by default and turn it on when I know what the site's intent is.

Kevin
As the devil's advocate I must point you to the fact that you are probably not the average user and in 99% off the cases not the target audience. That said, I make my sites non-JS compatible because I'm idealistic ;)
borisCallens
A: 

The real question is not whether it is relevant, but whether to use Graceful Degradation, or Progressive Enhancement as your scripting strategy.

Matthew Vines
A: 

If you don't want the page to work when Javascript is off then just have that be the message in html, and if javascript is on, by using unobtrusive javascript you can get rid of that message and make visible the rest of the application.

Depending on what you write for, in terms of javascript version, you may need to degrade if the browser the user has doesn't not have the latest version, so gracefully handling that is also important.

James Black
+2  A: 

It's generally much faster to browse with Javascript disabled (digg.com is lightning without JS), which is why it's popular.

In Opera it's really easy: you simply press F12 and untick the javascript option. I always browse without Flash, Java (not javascript), animated images and sound. I enable Flash on a per-site basis, eg YouTube. Sometimes I turn off JS temporarily if my system is slowing down.

And don't forget about:

  • Screen readers (I think they mostly have JS disabled)
  • Text browsers or other very old systems
  • Ad blockers (if your filename happens lands under their radar)
  • Any old browser that either doesn't support JS at all or the JS breaks (e.g. IE6 doesn't support some modern JS stuff).

The solution is to use progressive enhancement rather than graceful degradation, i.e. start with the basic HTML and add CSS. Then add Javascript and/or AJAX to parts of the site.

For example, if you had a site like Stack Overflow, voting up an answer could submit a form normally. If JS is enabled, it would do an AJAX request, update the vote count and cancel the form submission, without leaving the page. SO doesn't do this though...

DisgruntledGoat
+6  A: 

It is relevant and it will be relevant even after 10-20 years when javascript might be supported everywhere. making things work without javascript is important development technique because it forces you to keep things simple and declarative. ideally javascript should be used only to enhance experience but your website shouldn't depend on it.

there is clear advantage from maintenance point of view to have most of the code in declarative format (html+css) and as little as possible in imperative (javascript).

lubos hasko
So you keep it declarative, and you sacrifice functionality ? e.g. input checking etc. ? That seems a significant loss.
Brian Agnew
you don't need to (and you shouldn't) sacrifice good user experience at all. if you want to have client-side input checking, you can have it but it should be seen only as "plug-in" to existing functional html markup.
lubos hasko
+3  A: 

graceful degadation / progressive enhancement / unobstusive javascript is absolutely relevant!

as with all accessability issues: just imagine for one second what it's like to be the one on the outside who can't use the page.

imagine you're travelling around the world, you're in some hotel or internet café with really old computers, old software, old browsers, you want to look up your flight and you realize you can't because of some javascript incompatability in the old browser you're using. (try 'old mobile phone' or 'stuck behind a corporate firewall' for different scenarios)

image what a world of possibilities opend up to blind people with screen readers and the web, and image what it's like to find these possibilties closed again because of javascript.

so much for appealing to your better nature.

you might also want to do it to keep your site accessibly for search engines.

bjelli
+1  A: 

I'm going to have to make a case for the other side here. Peoples reasons for designing sites without javascript are largely idealistic. Given an enough time and money and the goal is achievable and will certainly open your website to the largest possible number of people. However in reality doing this will slow your development, increase the number of test cases that you have to deal with, and ultimately affect the quality of your application for those users that do use javascript.

In my opinion it is perfectly reasonable to choose to make your site only compatible with js enabled browsers and tell those users that dont have it that they are missing out. This allows you to concentrate on creating rich content that the majority of users will be able to view.

There are of course exceptions to this rule, but if you are looking to create a good website for the majority of users, or have a client who is after a flashy website with limited time or money then taking the decision that it is js enabled browsers only is a reasonable thing to do.

Jack Ryan
+8  A: 

I would argue that you shouldn't go significantly out of your way to accommodate for non-JS users for the following reasons:

  • All Modern Browsers Support JS

    This is a snapshot of browser usage today:

    http://www.w3schools.com/browsers/browsers%5Fstats.asp

    Even the oldest common browser, IE6, supports basic JavaScript and AJAX. If you decide not to integrate certain features b/c of a JS dependence, this proves that you are essentially doing it for people who started with JavaScript enabled and explicitly chose to disable it. I think these people should expect for some features, and perhaps even entire sites, not to work as a consequence.

  • Few People Willingly Disable JS

    Building on my point above, average web users don't know or don't care that JS can be disabled in browsers. It's largely a tech savvy crowd who knows how to do this (myself included), and as tech savvy users we should know when to turn it back on as well.

  • Cost of Support

    In light of the above, consider that choosing to accomodate users who have primarily willingly disabled JS comes with a very real cost. If you are managing a large project with heavy UI requirements, you can easily burn a lot of developer hours accommodating for what is a very small user preference. Check your budget. If it is going to take 2 devs working 40 extra hours each on the project to accomplish this feat, you are easily going to burn a few thousand dollars on what is essentially a non-issue for the vast majority of your users. How about using that time and investment to further buff up your core competency?

  • Precedence

    I may very well be wrong on this, but I think it would be difficult to find major media or social sites that
    don't rely on JavaScript for some
    portion of their functionality to
    work. If major businesses that rely
    on the operation and accessibility of their site to stay in business aren't doing it, there's a good chance it's because it isn't needed.

CAVEATS:

Know your market. Continue to build XHTML/CSS that is semantic (preferably by using the RDFa W3C recommendation). Still strive to make your sites accessible to the visually impaired. Don't believe everything you read. ;)

DISCLAIMER:

My argument above is largely dependent on how you define "graceful degradation." If you mean all the links still work, that's one thing, but if you mean all the links still work and so does the wombats game, that's another. I'm not trying to argue for making your site so JS dependent that non-JS users can't access any portion of it. I am trying to make an argument for the acceptability of certain features, even some core features, being reliant on JS.

Mark Hammonds
Also, many companies disable Javascript for security reasons. So even tech-unsavvy people might run afoul of your technology choices if you force Javascript.
Chuck
I would consider this an issue of knowing your market. If your web service targets people who work at large corporations with strict Internet access policies, you likely have more incentive to "degrade gracefully." However, if you are prepared to bend to the man on this issue, also be prepared to give up embedded Flash, forums, chat rooms, etc. Personally, I don't consider this a huge issue -users who work for an iron handed corporation will either find alternative access methods or will use personal computers after work.
Mark Hammonds
+13  A: 

Yes. Your web pages aren't just consumed by people: they're consumed by search engines, and crawlers, and screenscrapers. Most of those automatic tools don't support Javascript, and essentially none are going to generate UI events or look at deeply nested AJAX data. You want to have a simple static HTML fallback, if nothing else then so that your web pages are well indexed by the search engines.

Forget the crazies who disable Javascript; think of the robots!

Nelson
Google is blind. http://www.webpagesthatsuck.com/googleisgod.html
Robert J. Walker
This is a really good point!
leeand00
I assume that the vast majority of my human users will have JavaScript enabled, I don't make the same assumption of third party applications/bots/spiders. The majority of advanced JS features I use have no impact on the semantics of the markup or content of the page. In my mind, making pages accessible by bots/apps is an entirely separate issue from JavaScript "graceful degradation." This is even more true now that the W3C has adopted the use of RDFa as an official recommendation.
Mark Hammonds
Is it really considered crazy nowadays to run your browser with the NoScript plugin or have Javascript disabled? I still haven't seen any indication that JavaScript has evolved to deal with most of its original vulnerabilities.
Jeff Leonard
+3  A: 

Yes, it's relevant. Mobile browsers in use today do not all have Javascript enabled. It's available on new phones, sure. But there are millions and millions of people like me, who have phones running older browsers, and for all of us, a JS-required browsing experience is just plain broken.

I don't even bother visiting sites that didn't have progressive enhancement in mind when they coded. I'm not technically behind the times. My phone is a year old. But I'm not going to re-up my contract and buy a new phone because of a crippled web experience.

bigmattyh
I have an iPhone and there are plenty of sites (including stack overflow) that have annoying javascript caused quirks, so it's not just an issue with old phones.
FinnNk
+4  A: 

My position:

I browse with NoScript, so if I come on your site it will be without benefit of Javascript. I don't expect the full user experience.

What I want, before turning on JS, is to be assured that you're reasonably competent and not malicious, and that I actually want what you're using JS for.

This means that, if you actually want me to use your site, you should allow me to look around, using links. (If I see a site that's totally useless without Javascript, I generally think the designers were incompetent.) You should let me know what sort of functionality I'll get from enabling Javascript, and you should present the site in a legitimate-seeming way.

I don't think that's too much to ask.

David Thornley
+1 - my thought process exactly. Long live NoScript!
Andrew Heath
+2  A: 

I for one always have NoScript turned on unless I trust the site for a number of reasons including cross-site-scripting, click jacking, and HTML injection. It's not me being paranoid, it's because I know a lot of developers, and know most of them have no idea what web security is, never mind how to avoid vulnerabilities.

So until I trust a site there's no chance I'd let it do anything fancy.

For the unfamiliar, there are some interesting blog entries on the subject:

Rich Seller
And they say dinosaurs are extinct...
Nosrama
A: 

I'm actually in an interesting position when it comes to graceful degradation of JS. I'm working on a web application that bots and crawlers have absolutely no business looking into. There's nothing they can gleam that should be indexed.

The informational site accompanying the web application, however, should be indexed, and therefore JS degrades gracefully there.

In the web application, if you don't have JavaScript enabled, you're probably not supposed to be there. It's intended to be a rich interactive experience. The web application actually requires JS to be enabled, and for you not to be sitting behind a corporate firewall.

We're not serving anything malicious, its just our intent and purpose for the web application that's different. The goals of our web application and those of our informational site are completely different.

Patrick