DEV Community

Ben Halpern
Ben Halpern

Posted on

Should browsers still allow users to disable JavaScript?

We asked the question "Should browsers still allow users to disable JavaScript?" in the State of the Web Survey we just finished up with, and the results might be surprising.

Nearly forty percent of our lovely community members voted that browsers should no longer allow users to disable JavaScript.

The feelings involved here cannot fully be expressed merely as a binary. What are your thoughts on this subject?

Latest comments (77)

Collapse
 
weakish profile image
Jang Rush

JavaScript should be disabled by default. Browsers should ask users to enable JavaScript, just like locations, notifications, etc.

Collapse
 
qm3ster profile image
Mihail Malo

As long as I can display a <noscript> to them, why should a browser take an option away? Would be better if it was a per-domain option instead of a global though.

Collapse
 
lewiscowles1986 profile image
Lewis Cowles

Glad they are not in-charge. Browsers need to work towards not needing JS for core web-experiences.

Collapse
 
c0derr0r profile image
Irkan Hadi

I have to say, I am surprised by the vote.

The user should always have the choice, there are a lot of exploits that abuse javascript and the users have the right to "defend" themselves.

If your site doesn't handle disabled javascript gracefully then it is your fault, not the users.

Collapse
 
jsn1nj4 profile image
Elliot Derhay

This discussion is making me glad that I decided to not build my personal website/portfolio as an SPA.

Collapse
 
jrock2004 profile image
John Costanzo

Is there a way to see how many people actually disable JS in their browsers? I am guessing not but would be interested to see stats

Collapse
 
andrewlucker profile image
Andrew Lucker

Step 1) Browsers collude to force JS on users
Step 2) Somebody makes a new browser

Thank god that #2 is generally still an option.

Collapse
 
tforster profile image
Troy Forster

I would argue that almost all users do not know what JavaScript is, that it can be turned off, how to turn it off, and most of all just don't care.

However, I believe the on/off switch should remain in the browser but relegated to deep configuration or command line flags. It should be viewed in the same prioritisation as disabling CSS, images, video support, etc.

At the end of the day it's most likely going to be developers and technically minded people understanding and wanting to adjust these settings.

Collapse
 
mudlabs profile image
Sam • Edited

There's no reason to disable this feature.

The main reason devs seem to want this is so they can build cool stuff. It's like, hay I spent hours building this cool thing and you're not going to look at it? WTF!


If we can agree that the primary goal of web development is to create synergy between business needs and user needs, something like that. Then we can say as project value deliverability and user accessibility diverge, there is diminishing value. Diminishing value for the user to the business, and the business to the user.

If the needs of a project requires JavaScript but the user, for what ever reason needs it disabled, does it matter? Is this user "important" to the business? Does this business have any actionable value to the user?

It's the job of developers to bridge the business <-> user dived as much as possible. While maximising the business needs "first".

If this principle leads development, those who need find value will find value.

Collapse
 
ribugent profile image
Gerard Ribugent Navarro

Yes, it's website js code but it runs on the browser, so my computer my rules.

Collapse
 
mikeyroy profile image

For anybody in the camp that thinks users shouldn't be able to disable JS, load up any news article from any news site in a browser with no extensions enabled & try the page both with & without JS enabled. Which would you rather use? I'll take the lightweight content without heaps of ad, popup & video scripts served up from JS any day.

The internet is both better with and without JS, and the user should be the one to determine if they want to run it or not on a case by case basis. As a developer you can decide what restrictions you want to place on the end user for the intended experience. If you want your site to not function without JS, that's fine, not optimal, but fine.

What I think mobile browser developers should do is surface a toggle to turn off JS more readily on a site by site or global basis rather than have it buried in the settings. That could make mobile browsing significantly better.

Collapse
 
maple3142 profile image
maple

I think user should be enabled to disable javascript.
But they should know the website's features will only works as-is.

Collapse
 
jason_espin profile image
Jason Espin

As developers we have fallen into the trap of using too much JavaScript. Always think about the fallback first and keep your pages lean.

Collapse
 
mgomersbach profile image
Mark Gomersbach • Edited

The feelings can absolutely expressed as binary. Because you asked the people that make the sites. Not the users :D

Collapse
 
dmfay profile image
Dian Fay

It's pretty binary: nearly forty percent of our lovely community members are wrong. If you can't control what runs on your computer, you're no longer a user -- you're being used.