How to Enable or Disable JavaScript on Edge

In this post, you will learn how to enable or disable JavaScript in Microsoft Edge. I’m using a PC and Android in this case. Let’s get going.

PC

Open Edge browser.

Click on the three horizontal dots at the top right.

Click on “Settings.”

On the left sidebar, click “Cookies and site permissions.”

Click on “JavaScript.”

Turn the switch on (for enabling JavaScript) or off (for disabling JavaScript).

Notes:

  • To block JavaScript on a specific site, click the “Add” button next to “Block”. Once JavaScript is enabled, you can use this option to block JavaScript on certain sites.
  • Add the site for which you wish to allow JavaScript by clicking “Add” next to “Allow.” Using this option, you can allow JavaScript for certain websites if JavaScript is disabled.

Here are the alternate methods:

Method #1

Open local group policy editor.

Navigate to the Computer Configuration > Administrative Templates > Microsoft Edge > Content settings.

Then double-click “Default JavaScript setting” in the right pane.

Select Enabled.

Choose one of the following options you prefer from the drop-down list.

  • Allow all sites to run JavaScript
  • Don’t allow any site to run JavaScript

The first one is for allowing, while the second one is for blocking.

Hit the OK button.

That’s all.

Note: For default, follow the steps above but select Not Configured.

Method #2

Open Registry Editor. I suggest a Registry backup before proceeding.

Go to HKEY_LOCAL_MACHINE > SOFTWARE > Policies > Microsoft > Edge.

Right-click on the blank space in the right pane.

Select New > DWORD (32-bit) Value.

Type DefaultJavaScriptSetting and then hit the Enter key.

Double-click it. Provide 1 (to allow) or 2 (to block) in the Value data field.

Hit the OK button.

That’s it.

Note: For default, delete the DWORD you created earlier.

Android

Open the Edge app.

Press the button with the three horizontal dots below.

Hit on “Settings.”

Tap “Site permissions.”

Tap on “JavaScript.”

Activate (to enable) or deactivate (to disable) the switch.

That’s it.

When you disable JavaScript, you will see the “Add site exception” option.

This option allows you to allow JavaScript for certain websites.

To add a specific site, follow these steps: Press the option. Enter the URL of the website. Then press “Save.”

Read: