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
- Open Menu > Settings > Privacy and security > Site settings.
- Under Content, select JavaScript.
- Choose Sites can use JavaScript or Don't allow sites to use JavaScript.
- 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.





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.






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.






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:
- Enter
about:configin the address bar and accept the warning. - Search for
javascript.enabled. - Set it to
trueto enable JavaScript orfalseto 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.




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.



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.



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.
Reader Comments 0
Sign in with email or Google to join the discussion.