When even mobile browsers have JavaScript, is it really necessary to consider potential script-free users?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
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.
The real question is not whether it is relevant, but whether to use Graceful Degradation, or Progressive Enhancement as your scripting strategy.
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.
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.
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_stats.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.
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.