Ask HN: Why do you disable JavaScript?
As a newbie programmer, I'm learning finding what I can do with some simple jQuery pretty exciting. However, I am also aware that some people disable JavaScript in their browser.
I'm curious, for the tech-savvy HN audience specifically, why is this something you do (or if you don't any more, why did you and why did you stop)?
From a development perspective, how concerned should I be about all my functionality existing without JS?
40 comments
[ 1.8 ms ] story [ 101 ms ] threadOften a site will link in lots of third-party javascript, and this is where NoScript gives you more flexibility. A lot of times it's easy to tell where the advertising and tracking code is coming from and leave those domains disabled. Sited usually work any way.
The worst thing about NoScript is when a "third-party" site itself uses third party (fourth party?) code, since NoScript does not seem to detect that. Of course this is a heinous practice, and it's disturbing how often it seems to occur. If I really have to use a site that does that, I typically pop into IE.
1.5. As well as all those stupid social featu... sorry, bugs.
2. Makes pages load and render faster on my already-slow-by-now 100Mbps net.
3. Browser uses several times less RAM.
4. More privacy.
And you lose nothing as it is very easy to whitelist domains using some kind of plugin.
It's also a good way to find out who cares about the web, which is eroding as authors give up publishing semantic markup at stable URLs in favor of content entombed within client/server style apps.
In regard to development, it really depends on the kind of development you're doing. In most cases, just make sure the functionality degrades gracefully if a user has it disabled.
If you're building larger apps where JS plays a major role, let the user know they should allow JS to use it. IMO, unless you plan on making sure the app degrades completely this is the way to go.
A side benefit is that many annoying ads are blocked, in exchange for some pain when visiting new sites with separate domains hosting their CSS, images and other assets.
javascript is often used for no apparent benefit. my favourite (or shall I say anti-favourite) are websites that, when I click on an image thumbnail darker the main site, show some animation and then showing the bigger image. I have experienced it many times that disabling js would directly serve me the image and do so much quicker.
some online store I use pops up details for items when I mouse over. each time changing mouse focus. I can not get a simple list with all the details to use my browsers search function with. it also has no pagination but autoloads more items on the bottom. if I revisit the page (eg after looking at an image) I have to start at the beginning again.
javascript allows website to screw with my copying. hover the mouse on a Google result, the status bar shows the proper target. rightclick and copy to get some redirection shite instead.
phew, where do I stop...
disabling js also implicitly removes a lot of advertising, pop-up windows, always scrolling bars. when I have to use someone else's computer I often cannot understand how they stay sane.
Google steals my focus, I use backspace to navigate "back". on Google that leads to me removing characters on the search and the search automatically updating and adding more pages to the history to navigate back through.
javascript often leads to sites eating my CPU. I value my battery life and CPU temperature.
I use reddit a lot on a unreliable connection. I often happily vote, just to see later that javascript pretended my votes counted while in reality they never arrived at the other end.
javascript can be great for thing but it gets abused so much that disabling made me enjoy the web much more. if something does not work, well, chances are I was procrastinating anyways and won't miss anything important by closing the tab. I did not install flash for the same reasons.
if I have to enable js for something it is two keystrokes (in opera). I can also enable it per site very easily.
The latest fad for thumbnail-image animation is especially infuriating. A plain link is easy. I can choose where I want it opened. I can easily toggle between a full-size image to one that fits my browser window. The worst offender in this regard even hijacked my middle click so I could not open the image in a new tab. It pushed me so far I actually went looking for instructions on compiling Firefox and looking to remove Javascripts knowledge of a middle mouse button. (I didn't get very far.)
Another almost equally infuriating feature is the infinite scrolling page. I hate them. They don't add any useful interaction.
The worst thing, though not directly caused by javascript, has got to be "visibility: hidden" and "display: none" style attributes. Websites love to hide things and sometimes entire pages behind them for no reason other than the fact that you can make something to click on something and have javascript show it. (Another thing I wanted to remvove from Firefox.) Some people directed me to Firebug which is great for deleting those attributes. I seem to recall Google+ doing this at its begining, now it shows me the page on the few occasions I go there.
Once a user registers and logs in to your web application I believe it is fair to require them to enable javascript in order to proceed.
However, if you don't need to create a full blown javascript web application then I recommend allowing your javascript to gracefully degrade so users can still use the site. In this case javascript best used to "enhance" the experience but shouldn't destroy the experience if it's disabled. Hope that helps.
Also, keep in mind that this also depends on the organization your working for. In the case of government websites with strict accessibility guidelines, sites need to work without javascript enabled because screen readers for the visually impaired have a hard time viewing dynamically generated content.
Give me a reason to trust your site. When the first thing it wants from me is to execute arbitrary code, well, usually I just say "no, thanks", unless I already have a pretty good reason (so, from a third party or prior knowledge of the site's ownership and maintenance) to trust it.
I'm fine being an edge case. I've seen too many examples of friends, coworkers, family exploited -- and put a lot of effort into cleaning up a few -- to waste my time and well-being on those bent on transforming the web from content to executable, particularly some "anonymous" executable.
If something seems worth using and it requires JS to function correctly, I'll go ahead and enable JS. Unless you have projects in mind along the likes of jsFiddle, I don't think you have much to worry about.
As for why: it's nice to keep my laptop quiet and power-efficient when I'm simply browsing (especially if I'm not plugged in), a task that shouldn't be resource-intensive; it's an easy way for me to prevent potential malware when I'm using Windows.
2. Privacy - I'm far too lazy to go the full mile, but if I can avoid most of the tracking, I certainly appreciate it. 'though I do keep some domains null routed anyway.
3. Security - after Flash, JS is the main source of security problems, and I don't mean just attacks on my machine, but also stuff like CSRF and such.
But the most important:
4. Peace of mind - JS is used to implement the most annoying parts of the web: popups (particularly those "inline" that can't be blocked by the browser), paywalls, preventing right-click, distracting real-time updates, etc. The web is just a calmer, saner place without JS, and I like that.
http://www.ghostery.com/download
I don't expect developers to go out of their way to make the site work perfectly for me but I need to see something to convince me that it is worth a chance.
I'm not asking people to go days out of their way to make their websites work perfectly for people who don't use JavaScript, but please use basic best practices for website layout so I can at least have some idea of what your website is about.
But you are. If you've made the design decision to support progressive enhancement, testing a fallback for each individual element being enhanced is a minimum marginal cost. If you've made the decision to simply require JavaScript, many tasks get substantially easier and you eliminate a large fixed cost as well as the small variable cost.
But let's say, for sake of argument, that any site could magically be made to work JavaScript-free by the wave of a wand and 15 minutes passage of time.
You're still too small of a minority to justify 15 minutes for most people. Several years ago, Yahoo generously identified you as approximately 1% of global visitors across all user agents. Now consider that most visitors come from a refer with some context, so you already have some idea about what content you'll be seeing. If you don't care enough to enable JavaScript, your probably unlikely convert. If 2/3 of you turn JavaScript on (also generous) and typical conversion rates are 20% (very generous), you're looking at about 0.1% of total visitors.
Furthermore, as you prove, the category of people who disable JavaScript deeply overlaps with the category of people who haphazardly call other people's hard work "shoddy". These people make annoying customers.
You're simply not worth it.
Also 15 minutes to convert 0.1% could (and most likely will) still be worth it. There is no magical number for this. A myriad of factors come into play. You can't just issue a blanket statement that I am not worth it when you have no idea what I am worth or the worth greatly changes from site to site.
Requiring JavaScript for your website is not a deal breaker for me. Requiring JavaScript to see a single pixel of the website is what I am complaining about.
I'd ask you if you always wear several blinking reflectors, but I fear that this analogy breaks down very quickly.
Hypothetical: CDN X is having problems, and your scripts don't load. Errors pop up everywhere. Do you:
a) realize that scripting can and will fail for anyone, and tailor a page to work without it;
or
b) continue to plug your ears and point to statistics?
I have scripting enabled, but block Google Analytics and various advertising hosts. Do I count as someone to be supported? Or am I irrelevant because I'm a minute statistic?
I use private browsing for the privacy paranoia. No need to block cookies. I block JS and Flash mainly to protect from buggy sites that thrash CPU and memory.
EDIT: also, it has surrogate scripts to fix some sites, for instance it removes clutter from Google Search links. And ABE has almost the same functionality as RequestPolicy.
If you want to spend your development effort in something worthy that will increase your audience, your should instead make sure your sites are available to people with disabilities. They are a far bigger share of the market (any market) and you will feel better by supporting them.
All you really need to do on your site is to use a few noscript tags to send people a message saying that the site requires JavaScript to function and asking them to turn on JavaScript or whitelist your domain in NoScript.
Mark Pilgrim's "Dive into Accessibility" [1] is still a good primer on the subject, even though it's now a decade old.
[1] http://diveintoaccessibility.info/
I did try an extension (for Chrome) that prevented sites from disabling right-click, but then out of nowhere it inserted an ad in a page I was viewing, so I removed that extension and went back to blocking JS.