Should I worry about people disabling Javascript?

5,451

Solution 1

That depends on the site, its purpose, and who the demographic is.

If you're designing a government website, a banking site, a corporate home page, etc, then you absolutely should make sure the site works without JavaScript. But if you're designing an entertainment/leisure site like Twitter or Facebook, then it's not so bad to require JavaScript. And if your site is a rich internet application that absolutely won't work without client-side scripting (e.g. Meebo), then it's absolutely reasonable to require JavaScript.

Most features on a typical website probably shouldn't require JavaScript though. It's fine to center the user experience around clients with JavaScript enabled, but if you're running a forum, you should make sure that users can still post/read messages without JavaScript, even if it means the interface is more basic.

Solution 2

I'm surprised no one mentioned progressive enhancement. There's rarely a good reason to have functionality or content that requires JavaScript to work. Yes, JavaScript can make the user experience better, but it shouldn't be required to make the user experience possible.

So my answer is, you should build your website so everyone can access everything, even without JavaScript (assuming publicly available content. Site admins, intranets, etc, would be obvious exceptions as you can realistically dictate browser requirements in those situations).

EDIT

Oh, yeah. This is search engine friendly too. JavaScript is not.

Solution 3

Nicholas C. Zakas informs that around 1% of the actual visitor traffic to sites on the Yahoo network make JavaScript-disabled requests.

...the overwhelming majority of users has JavaScript-enabled browsers and can therefore take advantage of all of the enhanced functionality and dynamic interfaces developers and designers love to create. From a planning standpoint, it makes sense to spend more time on the experience that the largest numbers of users receive, knowing that your time investment is well worth it.

So find out the stats for your own site & build it so that it benefits the majority & still degrades gracefully for those who have JS disabled.

Share:
5,451

Related videos on Youtube

TheLQ
Author by

TheLQ

I write stuff Languages: HTML, CSS, JS, PHP, Java, Bash, Windows Batch, some ColdFusion, and some NSIS Learning: C#, C++ Databases: MySQL, some MSSQL Certifications: CompTIA A+, Network+, and Security+ Certifications Projects: PircBotX - A simple, easy to use, Java IRC Bot Framework forked from the popular PircBot framework, bringing many new up-to-date features and bug fixes in an official alternative distribution. Quackbot - A fully abstracted, fully pluggable, and fully extendable IRC bot based off of PircBotX, aiming for simplicity and power. It abstracts plugins to the point where they can be written in javascript or any other language that a PluginLoader exists for.

Updated on September 17, 2022

Comments

  • TheLQ
    TheLQ almost 2 years

    Often when picking new tools and frameworks I see the warning "Will not work if the user has disabled Javascript". I then look at my Javascript powered slideshow, Javascript powered menu, and Javascript powered gallery. Funnily enough, I chose these to replace the original flash based versions since I worried about the number of people that would see them.

    But is worrying about people disabling Javascript a legitimate worry? Should I try and design my site with JS being disabled in mind?

  • XOPJ
    XOPJ over 13 years
    The requirements for government or public websites that Lèse mentioned is called 508 compliance: section508.gov
  • TheLQ
    TheLQ over 13 years
    Lets see, Javascript based drop down menu's since I have yet to see a pure CSS based one that works (the drop down menu is an actual requirement), a Javascript slideshow on the front page to replace the old Flash based one since flash is... flash (required), and a Javascript gallery which was used to enhance usability and friendliness of the interface (never did like it when expanded pictures were just opened in a new tab, and in my case it would look and act horrible). Not really any alternatives
  • Mee
    Mee over 13 years
    "since I have yet to see a pure CSS based one that works". I use CSS menus and they work very well, can you elaborate more on that part?
  • Lèse majesté
    Lèse majesté over 13 years
    @Waleed: One potential problem with purely CSS-based dropdown menus is that they're too responsive. Good JS dropdown menus have a delay for mouseout events to avoid the diagonal problem (when temporarily leaving the parent menu item before reaching the submenu item). You can't do that with CSS, so you'd have to design your menus in such a way that the user will only ever move their mouse vertically or horizontally to get to submenu items. However, I agree that you should start with a CSS-based menu and progressively enhance it with JS so that JS isn't necessary for basic navigation.
  • Lèse majesté
    Lèse majesté over 13 years
    I know what you're getting at, but your site ought to look good with or without JS. JS really shouldn't be required to have a beautiful site.
  • Casey Chow
    Casey Chow over 13 years
    I agree on that... But lets say you have a menu that only shows when javascript is enabled, or maybe tool that uses heavy javascript, then i wouldnt worry about building 2 versions just to satisfy a small share... 80/20 rule applies
  • Lèse majesté
    Lèse majesté over 13 years
    Just make sure that menu is for a JavaScript-only feature or a non-vital enhancement, like a WYSIWYG editor. Your site should be navigable without JavaScript. Otherwise, it's worth the time to make a menu that is also visible without JavaScript.
  • Mee
    Mee over 13 years
    @Lèse, while you can't have a delay with CSS menus, there are tricks to get around this and surprisingly they actually work very well (for example see cssplay.co.uk/menus/final_drop3.html). Also, check the demo at cssplay.co.uk/menus/vertical-list.html to see how complex CSS menus can be. By no means this means that I'm trying to advocate against using javascript for menus. All I'm trying to say is that, if it can be done without javascript then why use javascript esp. for something as important as the site navigation?
  • John Conde
    John Conde over 13 years
    @TheLQ, everything you mentioned can be done without JavaScript. And the JavaScript you mention is only an enhancement. All perfect examples of when progressive enhancement should be used.
  • John Conde
    John Conde over 13 years
    Progressive enhancement doesn't require building the site twice. And if your site doesn't mind losing out on 20% of its potential revenue then that's fine. But try telling someone you willingly gave up 20% of your revenue just because you didn't want to do a little bit of extra coding and see what their response is. Try that with a client, too.
  • Casey Chow
    Casey Chow over 13 years
    Yeah but in this case its really not 20/80 more like 1/500 . We just recently finished building a high end site for a partnered venture using cappuccino wraped in an adobe air ajax application. The app would never run properly or even at all with javascript turned off. I think every application is different, but again it tells me a lot when facebook wont work without javascript turned on. My rule is if you are selling something allow for the sale to happen without javascript, beyond that javascript is a must.
  • Mee
    Mee over 13 years
    @Lèse, but I totally agree with you that the menu can be enhanced using javascript, as long as it still works without javascript.
  • Prasad Ajinkya
    Prasad Ajinkya over 10 years
    What's more with this approach you could also have non-javascript fallbacks in place. So the snazzy looking menu with JS could be a simple menu without JS.