
Ask HN: Why do you disable JavaScript? - dmragone
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.<p>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)?<p>From a development perspective, how concerned should I be about all my functionality existing without JS?
======
icebraining
1\. Performance - my meek single core CPU and my tendency to open dozens of
tabs at once often collide.

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.

~~~
pooriaazimi
Install Ghostery and AdBlocker. They're available for most modern browsers and
eliminate issues #2, 3 and 4.

<http://www.ghostery.com/download>

~~~
ibotty
how does that help with security, i.e #3?

------
zorked
You can safely ignore that "audience" since they comprise 0.01% of a niche.
They are vocal in sites like HN and Reddit and so on but the numbers are
safely ignorable from a market standpoint.

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.

------
snprbob86
Unless your customers are paranoid computer geeks, you should completely
ignore users who disable JavaScript. They are extremely few in number and they
are already accustom to being ignored. If your site is worth viewing as you
intended and are worth having as a customer, they will whitelist you.

~~~
reidmain
The problem most sites have is that they don't even attempt to convince users
who block JavaScript. Too many devs rely on JavaScript to do even the most
basic layout and end up throwing a blank screen saying "This site requires
JavaScript".

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.

~~~
snprbob86
And hence, for most small businesses, I'd contest that you are not a customer
worth having.

~~~
reidmain
Most small business aren't rolling their own website. They are contracting the
work out or just buying a prepackaged product from someone. If that person's
work is so shoddy that I can't see anything about them, well then I'm glad I
cannot possibly be a customer.

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.

~~~
snprbob86
> I'm not asking people to go days out of their way

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.

~~~
reidmain
You are again missing my point. I'm not asking for the site to work in the
sense that I can do even 5% of the intended functionality. I just want to be
able to see something to sell me on why I should enable JavaScript.

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.

------
prodigal_erik
Due to a long, sad history of exploited security defects, I only run
javascript from authors I consider both trustworthy and competent, and who
have useful behavior to add to my browsers. Basically if you don't even
realize your documents are unusable without scripting, I can't assume you're
smart enough to avoid attacks via malicious third-party code.

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.

------
nagisa
1\. Effectively blocks all forms of annoying advertisement.

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.

------
aw3c2
i find it highly annoying if pages show different content on the same url.
many bad sites with javascript do not update their url.

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.

~~~
J_Darnley
I agree with your sentiments here (except battery life, I use desktops).
Javascript is the cause of nearly all my most hated "features" that websites
use. Disabling it makes these websites better. Google does not try to out
think you. Comment boxes do not highjack your browser's hotkeys. Websites do
not tell you that you can't right-click.

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.

------
alexwolfe
In General I would say that the "marketing layer" of your site should be
accessible without javascript.

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.

~~~
pasbesoin
Or the "front page". Or some front interface such people are likely to
encounter.

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.

------
kevingadd
I run NoScript because it provides the full feature set of FlashBlock, plus
extra stuff. It's the easiest way to protect myself from flash/acrobat
reader/java 0-day exploits, and not running tracking JS/ad JS is an extra perk
on top of that.

~~~
unconed
I'm curious: how much of the web would you say is broken when you browse this
way? Is there a difference between 'consumer' sites and 'pro' sites?

~~~
threepipeproblm
In my experience, it's hard to evaluate this with NoScript because you
typically whitelist domains as you go. There is probably a Pareto distribution
here... whitelisting a handful of domains will cover 80% of your web browsing.
Once you get going, it's not very obtrusive... although I certainly have to
temporarily enable or whitelist new sites every day, it's an automatic
response at this point.

Often 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.

------
Shish2k
With JS on, my laptop idles at ~30% CPU use and the battery melts; with it
off, it idles at ~3% and the battery last much longer.

------
alter8
I used Opera from version 8 to 10 because it let me quickly enable/disable
Flash and javascript on a global basis. Then I found NoScript, with its fine-
tuning options, and moved definitely to Firefox. It's not as annoying as some
people think, just 1 or 2 clicks on a menu and reload if I really want to see
the page.

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.

------
WiseWeasel
I use RequestPolicy to block requests to other domains, which often prevents
various JavaScript files from being loaded. This is done in order to impede
companies like Google, Facebook and others tracking my web browsing on pretty
much every website in existence. Third parties don't need to be informed of
the pages I visit.

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.

------
Natsu
I do it because it reduces my attack surface by quite a bit. There have been
many bugs mitigated by having no JavaScript.

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.

------
Groxx
I have occasionally in the past - pages are often _far_ more responsive
without it. Generally that's due to blocking social widgets or crappy scroll
handlers.

~~~
yashchandra
Is this really true ? I would love to experiment this if I can have longer
laptop battery life by disabling JS.

~~~
Groxx
CSS overrides to get rid of box shadows and rounded corners can also make a
significant difference in scrolling speed. Essentially every browser out now
lets you define a user css file, just include something like:

    
    
      * { box-shadow: none !important;
          border-radius: 0 !important; }
    

etc. YMMV, and you may have to include the corner / browser specific variants,
I forget the details. Box shadows with a large spread _still_ perform
terrifyingly poorly in browsers, though small ones tend to be fast enough to
not notice on modern machines.

~~~
pasbesoin
Bookmarklets can do such things on a case by case basis, for any adjustments
you don't want to commit universally (via user.css).

------
khyryk
>how concerned should I be about all my functionality existing without JS?

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.

------
rbehrends
Disabled people, for example (I am not, but I know several). Javascript is
rarely a boon for accessibility.

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/>

------
Killswitch
I have never met a non-tech savvy user ever disable Javascript. Heck I've
never met one that even knows what Javascript is. But a lot of tech savvy
people I know do disable it mostly because of the whole "do not track"
paranoia. I personally don't disable it as most sites use it and I like the
functionality it provides.

------
tylerlh
I wouldn't imagine that many tech-savvy folks disable JS very much these days.
I think most people can appreciate how far it's come and what kind of role it
can play. I understand the security concerns but I think the pros greatly
outweigh the cons. I could be completely wrong though.

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.

~~~
tylerlh
If you're going to downvote this, I'd appreciate as to why.

------
dmragone
I really appreciate all the feedback and thoughts. It's all quite informative.
Thanks!

------
rsanchez1
The only time I have ever disabled JS for a website, I've done it because that
website broke some UI functionality I expect to work in every page. Most
often, what some website does is disable right-click. They must think that is
a foolproof way of "protecting" their content, and don't see it as an annoying
block that makes people disable JS.

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.

