OneBite.Dev - Coding blog in a bite size

turn off javascript tor

Code snippet for how to how to turn off javascript tor with sample and detail explanation

While surfing the web with Tor, there might be times when you want to turn off JavaScript to enhance your browsing security. This concise article will walk you through the process step by step.

Turning off JavaScript in Tor

  1. Open your Tor browser and click on the hamburger menu (the three parallel horizontal lines) found at the top right corner.
  2. Scroll down to Options.
  3. A new window will open. On the left side, you will see a panel. Click on Privacy & Security.
  4. Once you’re in the Privacy & Security settings, scroll down until you reach the JavaScript section.
  5. Here, select Do not allow any site to run JavaScript, then click OK to confirm your changes.

Code Explanation

  1. The hamburger menu includes various settings for the Tor browser.
  2. Clicking on Options will open a new tab with browser settings, including privacy options, search settings, and more.
  3. The Privacy & Security section includes settings for passwords, cookies, history, and other data.
  4. The JavaScript section specifically houses the option to specify how Tor Browser handles JavaScript coding on the websites you visit.
  5. By selecting Do not allow any site to run JavaScript, you block all websites you visit from running JavaScript code. Clicking OK will finalize your settings.

Keep in mind that disabling JavaScript will enhance your security but it may also hamper the functionality of certain websites. Thus, whenever you decide to enable JavaScript again, follow the same process but instead, select Allow all sites to run JavaScript.

javascript