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?
Top comments (77)
As long as JavaScript can still be used to abuse the user and their experience on the client-side, yes browsers should still allow JavaScript to be blocked.
While it may degrade their experience to do so, it is a conscious choice by the user in this case and not something forced upon them by malignant code.
That's my .02 anyway. 😎
I buy this. Frankly I’m pretty amazed by this vote split.
I am too Ben. Very interesting. Thanks for calling it out.
I wonder if the split is maybe correlated between older and younger developers? It would be interesting to see if there's any particular pattern amongst the voters on each side.
I am not amazed by this vote split. This is a classical example of self-selection bias.
I totally agree with you Steve. There are for example a lot of paranoid Linux guys that are using the Web in a Javascript free way. I know a couple :D. We shouldn't exclude them when developing browsers and Web pages. I always think about how my site works without Javascript and that all content is accessible in a certain way.
Thank you jshamg. I'm a Linux guy myself. 😎 Though not a paranoid one... well... anymore. 😂
I'm glad that you're considerate and inclusive of your user's situations and content accessibility. We should all follow your example. 👍
but does that come with the need of a version of web that just works without JS? now with the rise of all cool JS frameworks and paradigms things are much different than just losing small part of something when JS doesn't work, the whole site even doesn't render. so while it is upto user to disable their browser from executing JS but the site owner/developer should make sure they address those users.
Just for performance reasons, you shouldnt require Javascript for your side to load. If you write your app in JS, get Node to render it on the server for you like in the old days.
I really get annoyed when a page just presents a basic shell and starts loading content with JS, for no particular reason. Design your websites so they are usable even without JS, it's not that hard
apps delegating heavy lifting to browsers is also for saving server resources :)
I firmly agree the consumer should be allowed to disable whatever they want.
But please understand, from my perspective as a one-dev shop at a nonprofit, I can't be all things to all people. I wish I could. But it's just not possible. So, when I build a JS-dependent page, it gets a noscript saying, "Sorry. Wish we could do better but we don't have the resources."
Does that suck? Kinda. Am I ok with it? Totally.
Hi, actually that's far better message than saying 'please enable Javascript' you are doing good
Have you considered how it might be cheaper to write a website with a progressive enhancement mindset instead? (obviously depends a lot on what you're building)
I recently had a conversation with @mangel0111 in the comments of his post How to survive to Chrome for Android disabling JavaScript for 2G or slower connections?.
My answer is yes:
I love JS but it's admittedly easy to lose perspective and go down the rabbit hole.
Update: another nice article about this subject is The Bullshit Web
This is exactly the thing that was referenced when I had this convo IRL.
Chrome JS disabling on 2G is exactly the antithesis to this discussion.
I think we need to realize the difference between things that should be more like documents and more like rich applications.
DEV is rich, but it's like documents. If you come from Google to a post, you're here for the document. If you come to comment, message, react, interact in other ways, you're here for the application. Both are relevant use cases. The further you get into interactions, the more likely it will be that something might work, but the basic experience is document-driven.
Not that we do everything right but that's how I think about it.
Agree Ben.
Hopefully no one will introduce a standard HTTP header to tell the browser if the page is just a document or an app :D
I was going to point out the Android Chrome 2G plans too. Not only will browsers continue to allow users to block JavaScript, they may also choose to themselves.
Great other reasons here 👍
Thanks!
Thanks for the link to the Dear Developer article! I enjoyed the read.
Good list, good reasons. Two thumbs up!
thanks!
It doesn't matter whether a user can block JavaScript or not.
Loading scripts normally relies on the network, there is always the chance that the load will fail and the user will be left without the site's JavaScript anyway. Or it will partially load and only part of the JavaScript will be available.
This is not the user's fault, nor the developer's fault. But regardless, you now have a user on your site without JavaScript.
1% of all JavaScript requests on Buzzfeed timeout, that's 13 million requests a month.
It is up to developers to make their sites work (or at least fallback gracefully) whether JavaScript is or isn't available. The reason for JavaScript being unavailable, whether it's user choice, network conditions or browser interventions, is unimportant. Building a resilient experience is the only way we can serve our users best.
Quote of the day for me.
I feel my article about ads is relevant here. The primary use of JavaScript appears to be invade user's privacy and inject stuff from external places.
I'd be happy with an option to disable third-party JavaScript. Only JS coming from the same domain would be allowed.
I like that idea a lot.
It's not hard to serve the script from your domain instead, just use a reverse proxy. This is not really a solution at all
It makes a difference though. A reverse proxy avoids one of the problems with tracking by third parties. No longer does the Google CDN get knowledge of everybody who accesses your website.
Security is also improved since the domain of origin of this script is the same as the host domain. Combined with limited third domain access it neuters some of the abuse that JS can currently do.
It also serves all the content from one domain, allowing a single HTTP connection to be used. This reduces connection overhead and speeds up the page.
It also forces the content to be handled by the host domain, which then puts a little bit of pressure to not overload the hosting.
Thank you Carlos for bringing this up (#1).
@ben : Please use labels. You're using blue for no and red for yes. Come on - that's crazy!
Of course a user should be allowed to disabled JavaScript, or images, or CSS, or any other thing. Their browser, their bandwidth, their connectivity fees, their choice.
That doesn't mean that sites can't say "Hey, friend - we need JavaScript to be useful; if you don't enable it, you won't be able to use our site." (Same last sentence as the paragraph above...)
:)
TL;DR - 38.9% of respondents need some perspective.
I honestly don't feel like it's that hard of a question, but I guess it is more divisive than I thought. I feel like for many things, you can opt in or out -- don't want to use Photoshop? Use Gimp! Hate Java? Use only Swift-based stuff! (I am making stuff up here.)
But you really can't do that for the most part with the Internet. There's mostly just one of it, and you use browsers to interact with it. You caaaaaaaaaaaaaaan argue that "people who don't want to use Javascript can just skip the Internet" but that seems a) well, rude, frankly and b) the Internet is pretty solidly filling a real big spot in the world that is not easily replaceable.
Doesn't mean your site has to do a damn thing for them. (I mean, I personally think you probably should, but.) If you don't want people with no Javascript to use your site, that's just fine, then just ... offer them nothing, I guess, or offer them a really shitty user experience?
I just honestly cannot fathom any reason for feeling that users shouldn't be able to disallow it on their own browsers.
Reading the answers (except @rhymes answer, sory if I missed others...), I notice that even if internet is supposed to be worldwide, in the developers mind it is thought only for occidental world (I am guilty of that too).
We often forget that there is a lot of people in the world with a very limited access to the web, and js can ruin their access to your creation.
It is not really the internet I want to see.
It's nice to have js, but it should also work without it.
Yes they should, probably not browsers like Google chrome but browsers like Tor should definitely keep this feature for security reasons. Believe it or not the dark web is mostly just HTML and CSS with super minimal JavaScript.
Sounds like sites on the dark web are written by people who know what they're doing.