How to Block Intrusive Javascript on Chrome and Firefox

How to Block Intrusive Javascript on Chrome and Firefox Featured Image

Alongside animation and interactivity, Javascript powers a range of intrusive advertisements, obnoxious pop-ups and dangerous attack vectors like XSS. By selectively blocking certain sources of Javascript, you can get the content you want while blocking the content you don’t. Use these script-blocking extensions below to block intrusive advertisements and protect your privacy.

Block Javascript with ScriptSafe on Chrome

ScriptSafe blocks scripts on Chrome and Chromium-based browsers like Vivaldi. Like any decent script blocker, ScriptSafe blocks nearly all scripts by default. Then, you can allow certain URLs and domains to load scripts. This does break sites the first time you visit them. But once you permit the necessary scripts, ScriptSafe starts to fade into the background. There are options to change this behavior to allow scripts by default, if it annoys you.

scriptsafe-block-javascript-1

Click on the ScriptSafe icon to reveal the list of blocked content. The interface for toggling scripts on and off is organized by domain.

scriptsafe-block-javascript-2

You can use “Allow” to permit a specific URL to load content. Click “Trust” to allow any content from that domain to load. This is the difference between “apis.google.com” and “*.google.com.” You can also “Deny” or “Distrust” domains. This is the opposite version of “Allow” and “Trust,” respectively.

noscript-block-javascript-10

Certain content providers will be automatically marked as “unwanted,” blocking content from rendering without blocking the host domain. You can also temporarily permit URLs. This resets when you restart Chrome.

scriptsafe-block-javascript-3

Users also gain access to a huge range of power user settings, letting you tweak options as necessary. You’ll find tools to stop browser fingerprinting, block XSS and foil clickjacking.

Blocking Javascript with NoScript on Firefox

ScriptSafe is only available on Chrome and Chromium browsers. Firefox users can use NoScript instead. The extension is well reviewed, with a long track record of updates and development. It works like ScriptSafe, blocking scripts automatically until you explicitly permit the host.

noscript-block-javascript-6

To see the blocked scripts, click on or hover over the NoScript icon in the toolbar. You can also click the “Options …” button on the notification ribbon at the bottom of the window. Do this on a site like nypost.com, and you’ll see an alarming number of scripts blocked. More than eighty were blocked in this example.

noscript-block-javascript-7

Like ScriptSafe, NoScript blocks scripts by domain. To enable a script from a specific domain, click “Allow” or “Temporarily allow” next to its name. “Allow” permits scripts from that domain to load forever. “Temporarily allow” permits scripts to load from that domain until the end of the session.

noscript-block-javascript-8

NoScript also has an “Untrusted” option. Marking a domain as “untrusted” removes them from the dropdown list completely. This can help declutter a busy dropdown. In the future you won’t even have the option to allow scripts from this domain. Be judicious with what you distrust. To mark a domain as untrusted, mouse over the “Untrusted” dropdown and click on the domain’s name.

noscript-block-javascript-9

We can also permanently or temporarily allow all scripts on a page. Hovering over “Allow all on this page” provides a tooltip with the domains of the scripts you’re about to allow. This only works for scripts that NoScript “saw” when it loaded the page. Some scripts launch new scripts, so you may need to do this several times to get a website to load all of its scripts.

You can disable NoScript completely by clicking “Allow scripts globally” below this option.

Conclusion

Script-blocking extensions like NoScript and ScriptSafe are a must-have for serious browser security. Either makes a great companion to must-have extensions like uBlock Origin and HTTPS Everywhere.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Alexander Fox Avatar

Read next

Suzanne Simard sealed paper birch and Douglas fir seedlings inside plastic bags, fed them carbon-14 and carbon-13 dioxide, and nine days later found carbon had crossed between species through fungal threads in the British Columbia soil beneath her boots
A species of jellyfish called Turritopsis dohrnii can revert its adult cells back to a juvenile polyp stage when injured or starving, effectively restarting its life cycle, and biologists have so far failed to identify any natural limit to how many times it can do this.
A Japanese man named Jiroemon Kimura, who lived to 116, was born in 1897 when Queen Victoria still ruled and died in 2013, meaning a single human life personally overlapped with the invention of the airplane, the atomic bomb, the internet, and Instagram
The Hollywood sign originally read HOLLYWOODLAND when it was built in 1923 as a real estate advertisement for a housing development, and it was only meant to stand for 18 months, but nobody ever got around to taking it down and the city eventually adopted it as a landmark
Almost all of the world’s internet traffic does not travel by satellite but through fibre-optic cables lying on the ocean floor, a hidden web of wires crossing the deepest parts of the sea to connect the continents.
People who flip their phone face down on every table aren’t being secretive. They figured out that staying interruptible meant handing their time to whoever rang first
Twitch vs. Facebook Gaming vs. YouTube Gaming: What’s the Best Live Game Streaming Platform?
Chrome Extensions Ownership Transfer is a Direct Threat to You: How to Stay Safe