Back to List

You are viewing an unformatted version of this file. To get the formatted version, you have to enable JavaScript.
# Disabling JavaScript on evil sites This document explains how to disable JavaScript on sites with nasty behavior. Most websites still continue to work to some extent without JavaScript. ## JS vs JavaScript This document will use `JS` instead of `JavaScript` after this chapter because of heavy usage of the word, unless it describes a setting, progrmm or tool ## When to do this Here are some reasons why you want to block JS. - Website has annoying videos that play automatically - Website behaves very slow or takes long to load - Website loads a ton of trackers or ads - Website constantly shows danymic popups (usually to get you to subscribe) - You're on a limited data plan and want to conserve bandwidth - You browse the internet with a potato or comparable device - You depend on assistive technology (screen reader) and want to keep the page slim ## Important Information Please read these chapters before continuing ### Ads Disabling JS will indeed get rid of most ads. If this is your target, you might be interested in adblocking technology instead. Check the "Alternatives" chapter at the bottom for this. ### Breaking websites Some sites will break completely or partially if you don't have JS enabled. This can be something small, like a slideshow not working, missing some images or a video somewhere not playing, it can also be something big like a login form not working or the entire website being blank. If you experience problematic sites always check first if you disabled JS on that website. ### The Domain Rule If you block JS, browsers will block it across the entire domain, but only that domain. If you block JS on `https://example.com/some/annoying/page`, this is how it will affect other pages: URL | JS disabled too ---------------------------------|------------------------ `https://example.com/other/page` | Yes (Same Domain) `http://example.com/info` | No (Different Protocol) `https://www.example.com/test` | No (Different Domain) `https://example.org/other/page` | No (Different Domain) ## How to disable How to disable JS depends on what browser you use ### Google Chrome Google Chrome has a built-in feature to disable JS for individual pages. #### Disabling JS Visit the evil website and click on the symbol left to the address. It's usually a globe, info symbol or a lock. Click "Site Settings" on the bottom, this opens a new tab. ![Chrome Site Settings Popup](data/disable_js_chrome_1.png) Search for "JavaScript" and change to "Block". ![Chrome Site Settings Tab](data/disable_js_chrome_2.png) Close the settings tab. The settings take effect on the next page load, which chrome will offer to do. ![Chrome Reload option](data/disable_js_chrome_3.png) #### Enabling JS To enable JS again, perform the same steps and set the "JavaScript" setting back to "Allow (Default)" ### Firefox Firefox lacks a way to block JS on a single page, which means you need to perform extra steps to get this feature. #### Installing and configuring the extension Get yourself the [Whitelist or Blacklist JavaScript](https://addons.mozilla.org/en-US/firefox/addon/whitelist-javascript/) extension. ![Javascript Whitelist extension installation](data/disable_js_ff_1.png) After you install it, you will get a little red ![Red Biohazard symbol](data/disable_js_ff_5.png) symbol next to the address bar. Click that symbol with your right mouse button and select "Manage Extension" ![Javascript Whitelist symbol](data/disable_js_ff_2.png) Scroll to the very bottom and change from "Whitelist" to "Blacklist", then close the tab. ![Javascript Whitelist Options](data/disable_js_ff_3.png) If you've done this correctly, the symbol changes to ![Green checkmark symbol](data/disable_js_ff_4.png). There is still a red symbol in the address bar itself. If this bothers you, right click it and select "Don't show in Address bar" #### Disabling JS On any offending page, click the ![Green checkmark symbol](data/disable_js_ff_4.png) symbol. It will turn into ![Red Biohazard symbol](data/disable_js_ff_5.png) and the website reloads. #### Enabling JS To enable JS, click the ![Red Biohazard symbol](data/disable_js_ff_5.png) symbol. It will turn into ![Green checkmark symbol](data/disable_js_ff_4.png) and the website reloads. ### Internet Explorer Internet Explorer does not offer you this feature. Your options are to accept it, use another browser, or globally disable JS. ### Edge Edge does not offer you this feature. Your options are to accept it, use another browser, or globally disable JS. ## Alternatives For Google Chrome, Mozilla Firefox and Microsoft Edge you can get Ad blockers which will disable most annoyances on a website automatically for you. To get an ad blocker click on the respective link below: - [uBlock origin for Chrome](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm) - [uBlock origin for Firefox](https://addons.mozilla.org/firefox/addon/ublock-origin/) - [uBlock origin for Edge](https://www.microsoft.com/p/ublock-origin/9nblggh444l4) Make sure you pick the correct link for your browser. You will not be able to install the extension of another browser. We recommend uBlock origin for multiple reasons: - It's completely free - It's open source. Everyone can inspect and adapt the source code. - It's very good at finding ads - It's frequently updated - It's so efficient it uses less memory to detect and remove ads than the ads would take up themselves - The default configuration suits almost all users - It can easily be temporarily disabled if a page breaks - It allows the user to pick and remove unwanted elements from websites and will assist in creating rules. ### Why use an Ad Blocker - Most viruses that enter through your browser come via Ads - Ad agancies have no problem collecting as much identifying data about you as possible and selling it - Most ads will slow down your web experience - There's no need to tell you what to buy without paying you. One of the main reasons an increasing number of people no longer want to use cable TV is because you essentially pay to watch ads. - (Most) Ads take up valuable space on small screens