<p>It's fall of 2008, and I still hear developers say that you should not design a site that requires JavaScript.</p>

<p>I understand that you should develop sites that degrade gracefully when JS is not present/on.  But at what point do you not include funcitonality that can only be powered by JS?  </p>

<p>I guess the question comes down to demographics.  Are there numbers out there of how many folks are browsing without JS? </p>

[{'answer_id': 62807, 'author': 'RobbieGee', 'author_id': 6752, 'author_profile': 'https://Stackoverflow.com/users/6752', 'pm_score': 1, 'selected': False, 'text': "<p>As you said, demographics. The web is expanding onto devices that doesn't have very much power, for instance cellphones. If your site is usable without javascript, Opera Mini will likely show your site without any problems.</p>\n"}, {'answer_id': 62819, 'author': 'Marc Hughes', 'author_id': 6791, 'author_profile': 'https://Stackoverflow.com/users/6791', 'pm_score': 3, 'selected': False, 'text': '<p>Two simple questions to help you decide...</p>\n\n<ol>\n<li>Does using javascript provide some\ncore functionality of your site?</li>\n<li>Are you prepared to limit your\npotential users to those who have\nJS? (ie. Most people)</li>\n</ol>\n\n<p>If you answer yes to both of those, go for it!</p>\n\n<p>Websites are moving (have moved?) from static pages of information to interactive web applications.  Without something like Javascript or Flash, making compelling user interactions is sometimes not possible.</p>\n'}, {'answer_id': 62823, 'author': 'Krishna', 'author_id': 6995, 'author_profile': 'https://Stackoverflow.com/users/6995', 'pm_score': 1, 'selected': False, 'text': '<p>I think Javascript implementations in most modern browsers have now reached a reasonable level of maturity and there are a bunch of Javascript UI frameworks which let you build very attractive Javascript based web applications using web-services and such (regardless of the back-end server platform).</p>\n\n<p>An example is <a href="http://www.extjs.com" rel="nofollow noreferrer">ExtJS</a> - they have got a very extensive AJAX + UI widget framework which I recently used to build a full fledged internal web-app for a client with an ASP.NET backend (for webservices).</p>\n'}, {'answer_id': 62824, 'author': 'Antonio Cangiano', 'author_id': 6551, 'author_profile': 'https://Stackoverflow.com/users/6551', 'pm_score': 2, 'selected': True, 'text': '<p>5% according to these statistics: <a href="http://www.w3schools.com/browsers/browsers_stats.asp" rel="nofollow noreferrer">http://www.w3schools.com/browsers/browsers_stats.asp</a></p>\n'}, {'answer_id': 62827, 'author': 'ceejayoz', 'author_id': 1902010, 'author_profile': 'https://Stackoverflow.com/users/1902010', 'pm_score': -1, 'selected': False, 'text': "<p>It's the 21st century. People not permitting JavaScript need to exit the last millennium, posthaste.  It's a mature, widely used, and very useful technology that is one of the foundations of the recent expansion in useful web services.</p>\n"}, {'answer_id': 62830, 'author': 'warren_s', 'author_id': 6255, 'author_profile': 'https://Stackoverflow.com/users/6255', 'pm_score': 5, 'selected': False, 'text': "<p>Just as long as you're aware of the accessibility limitations you might be introducing, ie for users of screen-reading software, etc.</p>\n\n<p>It's one thing to exclude people because they choose to turn off JS or use a browser which doesn't support it, it's entirely another to exclude them because of a disability.</p>\n"}, {'answer_id': 62834, 'author': 'Rimantas', 'author_id': 6906, 'author_profile': 'https://Stackoverflow.com/users/6906', 'pm_score': 2, 'selected': False, 'text': '<p>I think the days of "content sites only" are gone. What we see now is WWW emerging as the platform of web applications, and the latest developments in the browser front (speeding up JS in particular) ar indication of this. \nThere can be no yes/no answer to your question - you should decide, where on content site&lt;---->web application continuum your site is and how essential is the experience provided by JavaScript. In my opinion - yes it is acceptable to have web applications which require Javascript to function.</p>\n'}, {'answer_id': 62835, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>Designing to degrade gracefully is the most that should be done. We are moving/have moved past the point of simple web "sites" to web "applications". The only option besides client side scripting to add round trips to the server.</p>\n\n<p>I think (personal opinion) that the "don\'t use JavaScript" comes more from a lack of understanding of what JavaScript is/does than any actual market data that shows a significant number of people are browsing without it.</p>\n'}, {'answer_id': 62856, 'author': 'Chris M.', 'author_id': 6747, 'author_profile': 'https://Stackoverflow.com/users/6747', 'pm_score': 1, 'selected': False, 'text': '<p>I think it comes down to what you\'re about to do. Are you writing a web APPLICATION? Then I think you\'re bound to use javascript and/or something like <a href="http://code.google.com/webtoolkit/" rel="nofollow noreferrer">GWT</a>. Just have a look at all the social sites, and google aplications like gmail. If you\'re writing a webpage with product descriptions and hardly any interactivity, then you can make the javascript optional.</p>\n'}, {'answer_id': 62857, 'author': 'Adam Davis', 'author_id': 2915, 'author_profile': 'https://Stackoverflow.com/users/2915', 'pm_score': -1, 'selected': False, 'text': "<p>You should be tying the functionality of your website to your audience.  That being said, every modern browser (save for the mobile platform) includes javascript, and so unless your audience includes luddites with decade old computers, you can assume they <em>have</em> javascript.</p>\n\n<p>The people you need to worry about, then, are those that specifically turn it off.  This includes:</p>\n\n<ul>\n<li>Corporate networks with tough security (not common, but some financial and defense institutions)</li>\n<li>Paranoid web-heads</li>\n</ul>\n\n<p>So, first, who is your audience?  Are there other websites that are comparable to your target?  Look at their site and success - do they degrade gracefully, and would yo be satisfied with their level of success?</p>\n\n<p>If you are targeting mobile applications, though, you can't guarantee javascript.</p>\n\n<p>-Adam</p>\n"}, {'answer_id': 62861, 'author': 'Crippledsmurf', 'author_id': 35031, 'author_profile': 'https://Stackoverflow.com/users/35031', 'pm_score': 2, 'selected': False, 'text': "<p>It's reasonable to design sites that use JavaScript but it is not safe to assume that all clients have support for Javascript and therefore it is important that you provide a satisfactory experience even when JavaScript is not available</p>\n"}, {'answer_id': 62869, 'author': 'Ramuns Usovs', 'author_id': 2952, 'author_profile': 'https://Stackoverflow.com/users/2952', 'pm_score': -1, 'selected': False, 'text': '<p>I would say that you should look at your target audience. If you can reasonably expect that they will have js enabled, and making everything work without any js is too much of a pain, then by all means - go ahead and ignore the non-js crowd, if, on the other hand you have to create a site that will be used by a very large audience/or you are perhaps building a government web site, then you must make sure that everything works, and it is easier in those cases to first build the site so that it works without any js, and add all the nice time-saving ajaxy bits later.</p>\n\n<p>In general though, almost everyone has js enabled by default.</p>\n\n<p>Though you should be aware that server-side validation of user posted data is a must in either case.</p>\n'}, {'answer_id': 62893, 'author': 'Peter Bernier', 'author_id': 6112, 'author_profile': 'https://Stackoverflow.com/users/6112', 'pm_score': 2, 'selected': False, 'text': "<p>Degrading gracefully is a must. At a minimum, you sure make use of the NOSCRIPT tag in order to inform potential <em>customers</em> first that your site requires javascript, and secondly why you require it. </p>\n\n<p>If it's for flashy menus and presentations that I could honestly care less about then I probably won't bother coming back. If there's a real reason that you're requiring javascript (client-side validation on forms, or a real situation that requires AJAX for performance reasons) then say so and your visitors will respond accordingly.</p>\n\n<p>I install extensions that limit both Javascript and Cookies. Websites that don't prominently state their requirements of both usually don't get a second visit unless there's a real need for it.</p>\n"}, {'answer_id': 62948, 'author': 'RichardAtHome', 'author_id': 7032, 'author_profile': 'https://Stackoverflow.com/users/7032', 'pm_score': 2, 'selected': False, 'text': '<p>You should never design a public site to rely on ANY technology/platform. The user agent may not display colour (think screen readers), display graphics (again, think screen readers or text only browsers such as links), etc.</p>\n\n<p>Design your site for the lowest common denominator and then progressively enhance it to add support for specific technologies.</p>\n\n<p>To answer the question directly: No, you cannot assume your users have Javascript, so your site should work without it. Once it does, enhance it with Javascript.</p>\n'}, {'answer_id': 63012, 'author': 'davidnicol', 'author_id': 7420, 'author_profile': 'https://Stackoverflow.com/users/7420', 'pm_score': 2, 'selected': False, 'text': "<p>it's not about browser capability, it's about user control.  People who install the noscript plugin for firefox so they don't have to put up with punch-the-monkey garbage ( the same problem that inspired stack overflow) will not allow your web site to do anything non-static until they trust you.</p>\n"}, {'answer_id': 63048, 'author': 'Kevin ORourke', 'author_id': 7332, 'author_profile': 'https://Stackoverflow.com/users/7332', 'pm_score': 2, 'selected': False, 'text': '<p>In terms of client software consider users/customers who are using a browser that supports some but not all Javascript.  For example, most mobile phone browsers support a bit of Javascript but nothing very complicated.  The browsers on devices such as the Playstation 3 are similar.</p>\n\n<p>Then there are browsers such as <a href="http://dev.opera.com/articles/view/javascript-support-in-opera-mini-4/" rel="nofollow noreferrer" title="Javascript support in Opera Mini 4">Opera Mini</a>, which support a lot of Javascript but are operating in an environment where the scripts are running on a server that then sends the results to a mobile device.</p>\n'}, {'answer_id': 63101, 'author': 'user7428', 'author_id': 7428, 'author_profile': 'https://Stackoverflow.com/users/7428', 'pm_score': 1, 'selected': False, 'text': '<p>I agree with the majority of the stackoverflow respondents.  JavaScript has matured and offers an "extra" level of functionality to a webpage,  especially for forms.  Those who turn off cookies and JS have likely been bitten while surfing in dangerous waters.  For the corporate power users that pay my way either in B2B or retail sites, JS is a proven and trusty tool.  Until something better comes along (and it will) I\'m sticking with JS.</p>\n'}, {'answer_id': 63127, 'author': 'Stephen Wrighton', 'author_id': 7516, 'author_profile': 'https://Stackoverflow.com/users/7516', 'pm_score': 2, 'selected': False, 'text': "<p>You should design websites with Javascript in mind--but not implemented. Consider, build it where every click, every action, performs a round trip to the server. That's the default functionality for older browsers, and those without JS turned on. </p>\n\n<p>Then, after it's all built, and everything is working properly, add in JavaScript which hijacks the link, button and other events, and overlay their standard functionality with the Javascript functionality you're wanting.</p>\n\n<p>Building the application like this means that it will ALWAYS work, which ultimately is what you're wanting.</p>\n"}, {'answer_id': 63174, 'author': 'CJM', 'author_id': 6898, 'author_profile': 'https://Stackoverflow.com/users/6898', 'pm_score': 2, 'selected': False, 'text': "<p>The received wisdom answer is that you can use JavaScript (or any other technology) providing that it 'degrades gracefully'...</p>\n\n<p>I have experience with disability organisations, so accessibility is important to me. But equally, I'm in the business of building attractive, usable websites, so javascript can be a powerful ally. It's a difficult call, but if you can build a rich, javascript-aided site, without completely alienating non-js vistors, then do so. If not, you will have to look at the context of the site and decide which way to jump.</p>\n\n<p>Regardless, there are no rights and wrongs with this question. However, in some countries, there is a requirement to build 'public' sites to be accessible, so this may be yet another factor in your decision. [In the UK, it is the Disability Discrimination Act.. though to my knowledge, no company has been prosecuted for failure to comply]</p>\n"}, {'answer_id': 63240, 'author': 'vava', 'author_id': 6258, 'author_profile': 'https://Stackoverflow.com/users/6258', 'pm_score': 1, 'selected': False, 'text': '<p>There\'s addon for Firefox called <a href="https://addons.mozilla.org/en-US/firefox/addon/722" rel="nofollow noreferrer">NoScript</a> which have 27,501,701 downloads. If you site won\'t work without JavaScript most of those guys wouldn\'t want to use it.</p>\n\n<p>Why you would install that addon? Ever wanted to get rid of the popup on the site that cover the most of the useful text you want to rid? Or disable flash animation? Or be sure that evil site won\'t steal your cookies?</p>\n'}, {'answer_id': 63352, 'author': 'Orion Adrian', 'author_id': 7756, 'author_profile': 'https://Stackoverflow.com/users/7756', 'pm_score': 2, 'selected': False, 'text': "<p>Search Engines don't support JavaScript. They're also blind and don't support CSS. So my suggestion to you is to make sure that the part of your product that needs to be indexable by search engines works without JavaScript and CSS. After that, it really depends on the needs of your users.</p>\n\n<p>If you have a very limited subset of users, then you can actually query them. But to remember that 10% of the population has some form of impairment ranging from vision issues (low vision, color-blindness, etc.) or motor functions (low hand dexterity). These problems tend to be more prominent in the elderly and the knowingly disabled</p>\n\n<p>If your site will target the general audience of Internet users then please make it degrade gracefully, but if you can't do that, then make a no-JavaScript version (like G-mail has).</p>\n"}, {'answer_id': 63580, 'author': 'Mark Ransom', 'author_id': 5987, 'author_profile': 'https://Stackoverflow.com/users/5987', 'pm_score': 1, 'selected': False, 'text': "<p>Some corporate environments won't allow Javascript, by policy or by firewall.  It closes the door to one avenue of virus infection.</p>\n\n<p>Whether you think this is a good idea or not, realize that not everyone has full control over their browser and it might not be their choice.</p>\n"}, {'answer_id': 63768, 'author': 'squadette', 'author_id': 7754, 'author_profile': 'https://Stackoverflow.com/users/7754', 'pm_score': 1, 'selected': False, 'text': '<p>There is a gradient between web sites and web applications.  However, you should alway be able to say "we are building a web site" or "we are building a web application".</p>\n\n<p>Web sites should be readable down to plain HTML (no CSS, no images, no JavaScript).   </p>\n\n<p>Web applications, of course, could just say "Sorry, JavaScript is needed" (which also assumes CSS for layout).    Application should still be able to work without images. </p>\n'}, {'answer_id': 63900, 'author': 'Kinjal Dixit', 'author_id': 6629, 'author_profile': 'https://Stackoverflow.com/users/6629', 'pm_score': 1, 'selected': False, 'text': '<p>The accessibility issue is the only important technical issue, all other issues can be socially engineered.  When one says that javascript reduced accessibility and another says that Web Applications can use javascript, can we take these two together to imply that all blind people are unemployed?  There has to be some kind of momentum in making javascript accessible.  Maybe a Screenreader object on the javascript side which can detect the presence of a screenreader and then maybe send hints to the screenreader, Screenreaders which can hook onto the browser, and maybe it gets glued together with a screenreader toolbar.</p>\n'}, {'answer_id': 63961, 'author': 'dckc', 'author_id': 7963, 'author_profile': 'https://Stackoverflow.com/users/7963', 'pm_score': 2, 'selected': False, 'text': '<p>JavaScript is great for extending the browser to do things like google maps. But it\'s a pointy instrument, so use it with care.</p>\n\n<p>My bank web site uses JavaScript for basic navigation between pages. <strong>Sigh</strong>. As a result, it\'s not usable from my mobile device.</p>\n\n<p>Make sure you\'re familiar with the <a href="http://www.w3.org/2001/tag/doc/leastPower.html" rel="nofollow noreferrer">Rule of Least Power</a> when considering JavaScript:</p>\n\n<blockquote>\n  <p>When designing computer systems, one\n  is often faced with a choice between\n  using a more or less powerful language\n  for publishing information, for\n  expressing constraints, or for solving\n  some problem. This finding explores\n  tradeoffs relating the choice of\n  language to reusability of\n  information. The "Rule of Least Power"\n  suggests choosing the least powerful\n  language suitable for a given purpose.</p>\n</blockquote>\n'}, {'answer_id': 65643, 'author': 'mikedopp', 'author_id': 7911, 'author_profile': 'https://Stackoverflow.com/users/7911', 'pm_score': 1, 'selected': False, 'text': '<p>if you want your site viewable by the top 100 companies in the US. I would write without javascript.</p>\n'}, {'answer_id': 65649, 'author': 'Travis Wilson', 'author_id': 8735, 'author_profile': 'https://Stackoverflow.com/users/8735', 'pm_score': 1, 'selected': False, 'text': '<p>Independence from Javascript and graceful degradation are important to an application despite the actual demographics -- because such an application probably has better software design.</p>\n\n<p>The "human user without Javascript" may be purely hypothetical (for example, if you\'re trying to make money with your product). But designing for that hypothetical user encourages modular software design which will pay off as you continue to develop your app.</p>\n\n<p>Javascript provides functionality. HTML provides data (on the page itself, and via links that point to more data). As a general rule that reaches well beyond browser apps: A well-designed software product will separate data from functionality. All data should be available, and the functionality should be a separate layer that consumes the data.</p>\n\n<p>If your Javascript is creating data at runtime, then it\'s time to get specific and figure out whether your webpage really is a piece of software (e.g. a mortgage calculator) or whether it\'s a document containing data (e.g. a list of mortgage interest rates). This should tell you whether it makes sense to rely on Javascript.</p>\n\n<p>As a final note/example, demographics can be misleading. Relatively few humans browse your site without Javascript, but lots of <strong>machines</strong> (search bots, data miners, screen readers for the disabled, etc.) are browsing your site without Javascript. Again, the distinction between data and functionality are important -- the bots are just making requests and looking for data in the responses. They don\'t need functionality. But if your user needs to invoke functions just to make your data accessible, the bots are getting no value from your site.</p>\n\n<hr>\n\n<p>One side point about the screen readers and other accessibility considerations for the disabled. This is an important niche demographic: a mind that navigates data in a human way, but who can only get data from your site in the same way machines get it. By providing data cleanly and semantically on your page, you make it available to the largest possible set of accessibility tools.</p>\n\n<p><em>Note this doesn\'t exclude Javascript from consideration.</em> Our mortgage calculator example can still work: accept input from the user, invoke Javascript, and write the output back into the clean semantic data layer of the page. Screen readers can then read it! And if they can\'t, you\'re encouraging the development of better screen readers that can.</p>\n'}, {'answer_id': 68158, 'author': 'HFLW', 'author_id': 252822, 'author_profile': 'https://Stackoverflow.com/users/252822', 'pm_score': 1, 'selected': False, 'text': '<p>Well, it depends on your userbase. If you know that people will be using your site from mobile devices, it\'s good to have unobtrusive JavaScript. However, if you\'re trying to appeal to a tech-savvy crowd, don\'t bother with it.</p>\n\n<p>However, if you\'re appealing to a crowd that may be using screen readers (blind people), I\'d highly suggest using <a href="http://en.wikipedia.org/wiki/WAI-ARIA" rel="nofollow noreferrer">WAI-ARIA</a> standards. Dojo\'s widget system has full support for this, and would be a great and easy way to do it.</p>\n\n<p>Anyway, in most cases, you don\'t need unobtrusive JavaScript. Most people who have JavaScript disabled are either using a smartphone, using Lynx, or have NoScript installed. It\'s enabled by default in all the major browsers, so you shouldn\'t have to worry.</p>\n\n<p>Lastly, it\'s good to at least have some unobtrusive JavaScript. <code>&lt;noscript&gt;</code> tags are your best friend. For example, one may want to replace a widget that draws rating stars with text. Example using dojo:</p>\n\n<pre><code>&lt;div dojoType="dojox.Rating" stars="5" value="4"&gt;&lt;/div&gt;\n&lt;noscript&gt;4/5&lt;/noscript&gt;\n</code></pre>\n'}, {'answer_id': 68414, 'author': 'Mike', 'author_id': 1115144, 'author_profile': 'https://Stackoverflow.com/users/1115144', 'pm_score': 1, 'selected': False, 'text': "<p>If you expect your app to work for everyone, you'll need a backup for all your javascript functionality.  If it's form validation, you should also check the data on the server before saving it.  So the answer is Yes, it's okay, but have a backup.  Do not rely on it.</p>\n"}, {'answer_id': 574951, 'author': 'Tim Perry', 'author_id': 68051, 'author_profile': 'https://Stackoverflow.com/users/68051', 'pm_score': 1, 'selected': False, 'text': "<p>As many people are saying, it's important to consider your user base, but whoever your users are there's a strong possibility that some (stats say 10%) of them will have some sort of disabilities, and screen readers don't like javascript. If you're only adding simple things, a javascript menu or something, then just make it degrade (or don't do it). If the site depends on javascript to work properly, make two versions, one for javascript and one without.</p>\n\n<p>I generally find that anything too javascript heavy is very difficult to make degrade well without just having javascript re-writing the page to a javascript version if the user can take it. Given this, it's well worth writing two pages from square one for complicated stuff.</p>\n\n<p>I would say that there are very very very few web sites that should be running without some support for users without javascript. You'd need to have a very dynamic application that completely didn't make sense as static pages,or you'd need to have a audience you could guarantee were ok with it (like on an office Intranet say).</p>\n"}]
['https://Stackoverflow.com/questions/62784', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6957/']