Turn Off JavaScript in Any Browser
(Chrome,FireFox,Microsoft Edge,Brave Browser,Opera,Safari on Mac,Tor Browser)
If you disable JavaScript in your browser, you can see which elements of your website require JavaScript to be displayed. When troubleshooting PageSpeed issues, especially when trying to remove unused JavaScript, this is a quick way to see how JavaScript is affecting your site.
In 2023, I think it's even more important for a web developer to check how websites look and perform when users disable JavaScript in their browsers. Building in this way is the cornerstone of continuous development, which is easy to use on both desktop and mobile devices.
I would still like to disable JavaScript on the pages I visit. Sometimes I need to test a working page, but sometimes I want to visit a website that isn't working properly and I want to see if JavaScript is causing it.
So here's a list (I'll update it regularly) of how to Disable/Turn Off JavaScript in different browsers.
Disable JavaScript in Google Chrome
I'm sure Google Chrome has changed this setting several times over the years, but you can always find it with a quick keyword to find it.
- Click the three dots menu in the top right corner
- Choose “Settings”
- On the left-side menu click “Privacy and security”
- Choose “Site settings”
- Scroll to the bottom to the “Content” section and click “JavaScript”
- Choose the option “Don’t allow sites to use JavaScript”
As already mentioned, it is not always easy to remember where it is. So if you forgot, type "Javascript" into the "Search Settings" box at the top when the settings page first appears. The search will tell you to click on "Site Settings" and from there the "JavaScript" feature will be highlighted.
Disable JavaScript in Microsoft Edge
The Edge browser is now based on Chromium, so you can find the equivalent of disabling JavaScript in Chrome. On the settings page, search for keywords or follow the steps below.
- Click the three-dots menu icon in the top right corner
- Select “Cookies and site permissions” on the left-side menu
- Scroll down a little to the “All permissions” section
- Click “JavaScript”
- Turn off the “Allowed (recommended)” toggle
From there, just like any other browser, you can enable or disable JavaScript on a per-site basis as needed.
Disable JavaScript in Firefox Browser
Firefox has a very different way of doing this. If you go to the Settings page from the Tools menu, you will see the Search option. But when I type "Javascript" in that search box, nothing comes up.
To disable JavaScript in Firefox, follow the steps below
You can also type "javascript.enabled" to make it more restrictive, but it's basically the same, it just shows JavaScript related settings.
Disable JavaScript in Brave Browser
Brave is another Chromium-based browser that has gained popularity in recent years thanks to its privacy features and Brave Rewards program.
You can search in Brave's javascript settings or follow the steps below:
- Click the hamburger (three-line) menu in the top right corner
- Choose “Settings”
- Click “Security and Privacy” on the left-side menu
- Click “Site and Shield Settings”
- Scroll down to the “Content” section and click “JavaScript”
- Select the option “Don’t allow sites to use Javascript”
For some reason, all of these Chromium browsers incorrectly spell "JavaScript" with "Javascript" in uppercase(S) in this part of their settings. You'd think Brave, the browser developed by the inventor of JavaScript, would make it, but apparently not.
Disable JavaScript in Opera
Opera is another browser that has been converted to Chromium, but the options and settings are slightly different from the other browsers described above.
- Click the three-line “Easy setup” menu button in the top right corner
- At the bottom of the “Easy setup” menu, click “Go to full browser settings”
- Click “Site settings”
- Scroll down to the “Content” section and choose “JavaScript”
- Select the option “Don’t allow sites to use Javascript”
Once you're on the settings page, you can search again if you've forgotten where your options are.
Disable JavaScript in Safari Browser (MAC OS)
The Safari desktop browser is no longer available on Windows computers, but here's how to disable JavaScript in Safari on macOS:
- In the menu area at the top, click “Safari”
- Choose “Preferences…”
- Uncheck the option “Enable JavaScript”
I haven't tried the latest version of Safari, but I believe the basic steps are the same.
Disable JavaScript in Tor Browser
I don't use the Tor browser, but I have it installed, and disabling JavaScript in Tor is pretty much the same as in Chromium-based browsers.
- Click the three-line hamburger menu icon in the top right corner
- Choose “Settings”
- On the left-side menu click “Privacy & Security”
- Scroll down to the section called “Security”
- Under “Security Level” select the third option “Safest”
As you can see, this is not just a JavaScript option, but an option for many features that can cause privacy and security issues.