Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Enable or Disable JavaScript in Major Browsers

Find the current JavaScript controls in Chrome, Edge, Firefox, Opera, Cốc Cốc, Safari, and Tor Browser, with safer per-site options and troubleshooting tips.

Table of Contents

JavaScript powers sign-in forms, menus, video players, shopping carts, and many other website features. It is enabled by default in modern browsers. If one site is misbehaving, blocking JavaScript only for that site is usually better than disabling it everywhere.

JavaScript and Java are different technologies. A browser message about JavaScript does not mean you need to install Java.

Chrome

  1. Open Menu > Settings > Privacy and security > Site settings.
  2. Under Content, select JavaScript.
  3. Choose Sites can use JavaScript or Don't allow sites to use JavaScript.
  4. Use the customized-behavior lists to allow or block individual sites.

You can also enter chrome://settings/content/javascript in the address bar. For one site, open it, select the site-information icon beside the address, choose Site settings, and change JavaScript.

Opening Chrome settings
Chrome privacy and security settings
Chrome site settings
Chrome JavaScript setting
Chrome site-specific JavaScript list

Older Chrome screenshots may show Advanced, Content settings, or an Allowed switch. Those labels have been replaced. Do not use old command-line shortcuts such as --disable-javascript; current site settings are clearer and easier to reverse.

Older Chrome menu
Older Chrome advanced settings
Older Chrome content settings
Older Chrome JavaScript options
Older Chrome exceptions dialog
Obsolete Chrome shortcut example

Microsoft Edge

Open Settings > Privacy, search, and services > Site permissions > All permissions > JavaScript, then turn Allowed (recommended) on or off. You can open edge://settings/content/javascript directly and maintain per-site Allow and Block lists.

Contrary to some older instructions, modern Chromium-based Edge supports JavaScript controls. Internet Explorer is retired and should not be used as an alternative.

Opera and Cốc Cốc

Both browsers are Chromium-based, so their route closely follows Chrome:

  • Opera: Settings > Privacy & security > Site settings > JavaScript.
  • Cốc Cốc: open its menu, select Settings > Privacy and security > Site settings > JavaScript.

Choose the default behavior or add a site-specific exception. Menu names can vary slightly by version.

Cốc Cốc browser menu
Cốc Cốc JavaScript settings
Opera settings menu
Opera advanced settings
Opera site settings
Opera JavaScript control

Firefox

Firefox does not provide a normal Settings switch because JavaScript is required by much of the web. To restore a preference that was changed:

  1. Enter about:config in the address bar and accept the warning.
  2. Search for javascript.enabled.
  3. Set it to true to enable JavaScript or false to disable it globally.

Changing about:config can affect stability, security, and performance. For temporary or per-site control, a well-reviewed content-blocking extension is more practical, but extensions also receive browser permissions and should be chosen carefully.

Firefox about config warning
Searching Firefox advanced preferences
Firefox javascript.enabled preference
Toggling JavaScript in Firefox

Safari on iPhone and iPad

Open the Settings app, go to Apps > Safari > Advanced, and turn JavaScript on or off. On older iOS versions, Safari appears directly in the main Settings list.

Safari settings on iPhone
Safari Advanced settings
Safari JavaScript switch

Tor Browser

Use Tor Browser's built-in Security Level instead of manually editing about:config. Select the shield icon, open security settings, and choose:

  • Standard: JavaScript and normal website features are enabled.
  • Safer: JavaScript is disabled on non-HTTPS sites, with other potentially risky features restricted.
  • Safest: JavaScript is disabled by default on all sites, and more media and font features are restricted.

Manual changes can make your browser behavior differ from other Tor users and weaken fingerprinting defenses. Follow the Tor Project's security-level guidance.

Tor Browser security settings
Tor Browser security level
Tor Browser advanced preference warning

If a site still says JavaScript is disabled

  • Reload the page after changing the setting.
  • Check whether that site is in a Block list.
  • Temporarily test without script-blocking or privacy extensions.
  • Clear the site's stored data, then sign in again if needed.
  • Check whether work or school policy manages the setting.
  • Try a private window or a fresh browser profile to isolate the cause.
Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.