• Home
  • blog
  • Should Users be Permitted to Disable JavaScript?

Should Users be Permitted to Disable JavaScript?

Get off my lawn! Should Users be Permitted to Disable JavaScript in 2017?

I last raised this question back in 2013 when Mozilla decided to remove the “disable JavaScript” setting from the options dialog in Firefox 23. The primary reasoning:

  • Much of the modern web can break spectacularly without JavaScript.
  • It saves users from themselves. Few people know what JavaScript is and even fewer need to disable it.
  • Those that do can find hidden options elsewhere should they really need it.

Disabling JavaScript remains an option for those in the know.

This popular article has been updated to address the seismic shift in the JavaScript landscape since it was originally published in 2013.

Do Users Benefit From Disabling JavaScript?

Possibly: refer to I Turned Off JavaScript for a Whole Week and It Was Glorious. Without JavaScript, a magical web appears without bloat, advertising, pop-ups, cookie warnings, scroll-jacking and many of the other dark patterns we experience today.

There are also people with perceptual problems who disable JavaScript out of necessity. Few sites consider accessibility guidelines so it remains the easiest way to reduce movement and animated effects which can induce disorientation and nausea.

Article content is normally visible, but the downside is that many web applications fail without JavaScript. Some provide a downgraded experience but it can break shops, maps, games and social networking sites. Content sites powered by modern client-side-only application frameworks may show nothing more than a blank page.

Can You Prevent Users Disabling JavaScript?


It is impossible for site owners or developers to force users to download and run JavaScript. Browsers ‘pull’ files from your server; the user can stop that occurring via browser settings, proxy methods, plug-ins or a range of other interception options.

Your script can also be modified or have specific facilities disabled. Always remember that users are in control: it’s their device and connection. They choose to visit your site and can omit anything they don’t want.

Can You Support Those Without JavaScript?

Few people actively disable scripting. It’s tempting to think those users deserve everything they (don’t) get, but the reality is more problematic. JavaScript is fragile; your scripts can break for reasons including:

  • the HTTP request fails
  • the request did not complete
  • a firewall blocked the response
  • the service provider blocked or modified the script
  • a browser plugin intercepted or modified the script
  • the browser didn’t support the code or facilities you require
  • another script raises an error which stops all scripts executing

These issues are especially prevalent in the mobile world where a user could be travelling, using a less powerful device, connecting via a slow network, using flaky airport wifi, etc.

The solution continues to be Progressive Enhancement. You create the simplest HTML-only experience then enhance it with images, fonts, CSS and JavaScript when those files successfully download and execute. Your JavaScript can detect when APIs/facilities are available to:

  • avoid running code which would result in an error, or
  • load polyfills which implement identical functionality.

Users can receive a different experience. Those using the latest Chrome on a desktop may get the highest level of functionality. Those running Opera Mini on a two year-old mobile may receive a basic styled page. Importantly, everyone receives something and the site/app remains usable for everyone.

Is Progressive Enhancement Worth the Effort?

That’s a decision for you and the application you’re building.

Progressive Enhancement makes sense for content sites and online stores which need to reach the widest possible audience. When implemented well, it incurs little development overhead and can save time. You know all browsers will continue to render your site regardless of updates they receive in the past, present or future.

Simpler applications may also benefit. An app which posts messages to a social network requires little more than an HTML5 form and some back-end processing. Progressive Enhancement then improves the experience by removing the page refresh, adding styles, implementing input validation, providing a character count, handling errors, making it work offline and more.

Continue reading %Should Users be Permitted to Disable JavaScript?%