How to Completely Disable ‘JavaScript’ via Group Policy in Microsoft Edge

If you need to strictly control active content in enterprise environments, you might want to completely disable JavaScript across all websites in Microsoft Edge. This guide explains how to enforce this restriction using Group Policy in Windows 11.

Why Disable JavaScript in Edge?

JavaScript is a core component of the modern web, but it is also a common vector for malicious code execution and tracking scripts. Disabling JavaScript system-wide can provide an extreme, high-security browsing environment where only static HTML and CSS are rendered. This is typically reserved for highly secure kiosks, strict zero-trust terminals, or environments where active web scripts are strictly forbidden.

Prerequisites

Before proceeding, ensure you have the following:

Disable JavaScript using Group Policy

  1. Press Win + R to open the Run dialog.
  2. Type gpedit.msc and press Enter to launch the Local Group Policy Editor.
  3. Navigate to the following path: Computer Configuration > Administrative Templates > Microsoft Edge > Content settings.
  4. In the right pane, locate the policy named Control use of the JavaScript API (or Default JavaScript setting).
  5. Double-click the policy and set it to Enabled.
  6. Under the Options section, change the “Default JavaScript setting” drop-down menu to Do not allow any site to run JavaScript (Value: 2).
  7. Click Apply and then OK.
  8. To enforce the policy immediately, open Command Prompt as Administrator and run gpupdate /force.

Once applied, Microsoft Edge will completely block JavaScript execution on all websites, overriding any user attempts to enable it within the browser settings.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.