A recent update to the cross-browser content blocker uBlock Origin introduced an option to block JavaScript by default for all visited sites or individual sites.

The new option of uBlock Origin 1.17.0 gives users even better control when it comes to blocking content from running automatically on sites that they visit in any of the supported browsers.

Side note: you can read my journey to getting uBlock Origin to update to the new version in Chrome here.

The first thing that you need to do is make sure that you run at least uBlock Origin 1.17.0. Click on the extension's icon in the address bar of the browser that you are using and in the interface that opens on the settings icon. Switch to the about tab on the dashboard; the version of the extension is listed there.

Configure uBlock Origin to disable JavaScript

Users of uBlock Origin have several options when it comes to the new JavaScript blocking functionality:

Enable it for individual sites. Enable it for all sites.

A click on the uBlock Origin icon displays the main interface that you use to control content. You find the new option to disable JavaScript for the site in the bottom-right corner. The new icon looks like a closed tag </>.

A click disables JavaScript on the site and adds a red cross to the icon to indicate that JavaScript is turned off on the site. Note that this is temporary unless you make the change permanent using icons that uBlock Origin displays after you activate the option.

Advanced users may add individual sites to the "my rules" section of the dashboard. Use the no-scripting: [hostname] true template and replace [hostname] with the domain that you want to disable JavaScript on.

The second option that users have is to block JavaScript on all sites by default similarly to what NoScript does for Firefox.

Open the uBlock Origin settings. Make sure that the Settings tab is selected. Check the "Disable JavaScript" box there.

What happens when you disable JavaScript?

One core difference between using the new JavaScript switch and using uBlock Origin without it is that noscript tags are executed when the former is used to disable JavaScript. The latter blocks individual script resources instead only.

The master switch takes precedence over "dynamic filtering rules and static filters related to script resources".

Closing Words

The option to disable JavaScript for all visited sites or on a per-site basis adds another powerful tool to the already-great arsenal that uBlock Origin offers. Users who disable JavaScript globally will run into sites that break as some may require JavaScript for some or even all functionality.

Summary Article Name uBlock Origin can block JavaScript by default now Description A recent update to the cross-browser content blocker uBlock Origin introduced an option to block JavaScript by default for all visited sites. Author Martin Brinkmann Publisher Ghacks Technology News Logo

Advertisement