Home » Others » How to Enable or Disable JavaScript in Edge

How to Enable or Disable JavaScript in Edge

Written by Thirumalraj

In this post, you’ll see the steps to enable or disable JavaScript on Microsoft Edge.

I’m using Windows 11 PC and Google Pixel 4a (Android 12) in this case. Let’s begin.

How to Enable or Disable JavaScript on Microsoft Edge (PC)

Here are the steps:

Open Edge browser.

Hit the three horizontal dots at the top right.

Select “Settings.”

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

Click on “JavaScript.”

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

That’s it.


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

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.

If you don’t see the Edge key mentioned above, you need to create it, and here’s how: Right-click on the Microsoft key and select New > Key. Type Edge and then press the Enter key.

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.

How to Enable or Disable JavaScript on Microsoft Edge (Android)

Open the Edge app. Select the button with the three horizontal dots below.

Hit on “Settings.”

Tap Privacy and security > Site permissions.

Tap on “JavaScript.”

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

That’s it.

You can see the “Add site exception” option, which allows or blocks JavaScript for specific websites as an exception.

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

That’s all.

Thanks for reading.