JavaScript is a scripting language used by most modern websites. However, hackers can misuse it to inject scripts, leading to scams. Hence, it is good to block JavaScript when visiting an unsecured site.
However, blocking JavaScript can lead to sites not responding or working at all. Chrome browser on Android allows us to configure to enable or block the JS execution for all sites or add exceptions to restrict specific sites.
In this guide, I have shared written (and video) instructions about:
Watch the Video Tutorial
Find the video guide helpful? Please consider subscribing to our YouTube channel for more such videos.
Block JavaScript Execution
JavaScript is enabled for all the sites by default unless you’ve changed it. But, if you want to block or disable JavaScript, you can do it easily in the browser. Here are the steps to do:
- Launch the Chrome app on Android phones.
- Tap on the More menu for options.
- Select Settings from the list.
- Scroll down to the Site Settings option and tap to open.
- Tap on the JavaScript tab, which is default set to Allowed.
- Toggle the button to Turn OFF and Block the JavaScript on Chrome Android.
It will completely block the JavaScript loading from the websites on your Chrome browser. However, in the ideal online world, blocking JavaScript is not preferred. This will screw up the entire website design, and you may show plain text only.
Configure JavaScript with Site Exception
Configuring JavaScript to allow or block certain websites is possible with the site exceptions option.
- Launch the Chrome browser on Android.
- Tap on the More menu for options and select Settings from the list.
- Scroll down to the Site Settings option and tap to open.
- Tap on the JavaScript tab, which is default set to Allowed.
- Tap on the command + Add site exception on the JavaScript settings page
- Enter the website URL you add to the exceptions list in the window.
- Tap on the Add command button to commit the changes.
The exception will behave based on your JavaScript settings — Allowed or Blocked.
If you add any website to the site exception list, the behavior is inversed by the setting of the JavaScript toggle. i.e.
- if you have Allowed JavaScript, then site exceptions will be blocked, and
- if you have Blocked JavaScript, then site exceptions will be allowed to load JS in Chrome.
Bottom Line
You can completely customize the javascript execution on Android smartphones. You can enable or disable execution for any website per need. The exceptions in the javascript settings page make it highly efficient on the web browser.
Similarly, you can configure JavaScript on a Chrome computer. The site exceptions feature is also available in the computer browser.
Lastly, if you've any thoughts or feedback, then feel free to drop in below comment box. You can also report the outdated information.
Please turn off JavaScript to properly view this page.
For what it is worth: is there ANY Android browser that offers a QUICK and simple Off/On toggle switch for Java scripts? Burying this function deep in the guts of the settings menu is counter-intuitive. That’s why many desktop browsers allow this toggling directly in the front frame or via AddOns.
For the fun of it: how about a similar quick button to wipe all cookies at once?
Both features would help to overcome the obnoxious advertising and paywall trickery by many sites..
PLEASE?
Thanks!
Hello, I don’t think any browser offers a JavaScript toggle button at the first instance. Even other browsers do have the option to toggle JS, but it’s within the Site Settings menu.
Taking about wiping all cookies at once, you can easily do that with few taps. Of course, even this is something not available immediately on the main screen or menu, but available as a sub-menu under Privacy settings on Chrome for Android.
Can’t find the problem.!