JavaScript is usually on by default, but you may need to turn it back on if a website stops working

JavaScript is a programming language that runs inside your browser to make websites interactive — things like dropdown menus, live search results, and forms that respond when you type. Most websites need it to work properly. If a page looks broken, won't load, or shows a blank screen, JavaScript might be turned off.

The steps to turn it back on depend on which browser you use. In Chrome, Edge, and Firefox, JavaScript is on by default and you cannot turn it off from the settings menu anymore — those browsers removed that option because too many websites stopped working without it. In Safari, you can toggle it on and off. If you use an older browser or a less common one, the setting may be in a different place.

This guide walks you through the most common browsers and explains what to do if a website still does not work after you turn JavaScript on.

Key Takeaways

  • Chrome, Edge, and Firefox have JavaScript on by default and do not let you turn it off in settings — if a site needs it, the browser will use it automatically.
  • Safari users can turn JavaScript on by opening Preferences, clicking Security, and checking the "Enable JavaScript" box.
  • If a website still does not work after JavaScript is on, the problem is usually something else — try clearing your browser cache or using a different browser to test.
  • Some websites block JavaScript on purpose for security reasons, and those sites will work without it even if your browser has it enabled.
  • Browser extensions can sometimes block JavaScript on specific websites, so disabling extensions is a useful troubleshooting step.

How to turn JavaScript on in Chrome

Chrome has JavaScript enabled by default and does not provide a way to turn it off in the settings menu. Google removed this option years ago because so many websites depend on JavaScript that disabling it made the web unusable.

If you are using Chrome and a website is not working, the problem is almost certainly not JavaScript. Instead, try clearing your browser cache (the stored copies of web pages on your computer), reloading the page, or opening it in an incognito window. If the site works in incognito mode, an extension is probably blocking it — you can find which one by disabling extensions one at a time.

To check that an extension is not interfering, click the puzzle piece icon in the top right corner of Chrome, then click the extension name and select "Manage extension". Look for a toggle that says "Allow on all sites" or similar, and make sure it is on.

How to turn JavaScript on in Firefox

Like Chrome, Firefox has JavaScript on by default and removed the ability to turn it off through the settings menu. The browser treats JavaScript as essential to how the modern web works.

If a Firefox website is not loading properly, start by reloading the page with Ctrl+Shift+R (or Cmd+Shift+R on Mac), which clears the cache for just that page. If that does not help, check whether an extension is blocking the site. Click the menu icon (three horizontal lines) in the top right, select "Add-ons and themes", then "Extensions". Look for any extension that might block scripts or ads, and either disable it or add the website to its allowlist.

How to turn JavaScript on in Safari

Safari is the only major browser that still lets you toggle JavaScript on and off. It is on by default, but if you or someone else using your computer turned it off, you can turn it back on.

On Mac, open Safari and click "Safari" in the menu bar at the top. Select "Settings" (or "Preferences" on older versions), then click the "Security" tab. Check the box next to "Enable JavaScript". Close the window and reload the website.

On iPad or iPhone, open the Settings app, scroll down and tap "Safari", then scroll down again and toggle "JavaScript" on. The change takes effect when ready.

How to turn JavaScript on in Microsoft Edge

Edge, like Chrome and Firefox, has JavaScript on by default and does not let you disable it in settings. Microsoft made this choice for the same reason — websites need it to function.

If a site is not working in Edge, reload it with Ctrl+Shift+R (or Cmd+Shift+R on Mac). If that does not help, check your extensions. Click the puzzle piece icon in the top right, find any extension that blocks scripts or ads, and either turn it off or allow it on that specific site.

What to do if a website still does not work

If you have confirmed that JavaScript is on and a website still does not load or looks broken, the issue is usually not JavaScript itself. The most common causes are a browser cache that is out of date, an extension that is blocking content, or a problem with the website itself.

Start by clearing your browser cache. In Chrome, Firefox, and Edge, press Ctrl+Shift+Delete (or Cmd+Shift+Delete on Mac) to open the cache-clearing menu. Select "All time" under the time range, check "Cookies and other site data" and "Cached images and files", then click "Clear data". Reload the website.

If clearing the cache does not work, try opening the site in incognito or private mode. This mode does not load extensions or use your cache, so it tells you whether the problem is one of those things. In Chrome, press Ctrl+Shift+N. In Firefox, press Ctrl+Shift+P. In Safari on Mac, press Cmd+Shift+N. If the site works in private mode, an extension is the culprit — disable them one at a time to find which one.

If the site still does not work, try opening it in a different browser. If it works in a different browser, the problem is specific to the first browser and not JavaScript. If it does not work in any browser, the website itself may be down or having problems.

Why some websites work without JavaScript

Not every website uses JavaScript. Some sites, especially older ones or those focused on security and privacy, are built to work with just HTML and CSS. These sites will function normally whether JavaScript is on or off.

Other websites deliberately block JavaScript as a security measure. They do this to prevent certain types of attacks or to protect user privacy. If you visit one of these sites and JavaScript is on, the site will still work — the site itself is choosing not to use JavaScript, not your browser blocking it.

Frequently Asked Questions

Is JavaScript a security risk?

JavaScript runs on your computer inside your browser, so in theory it could be used to attack you. In practice, modern browsers have strong security features that limit what JavaScript can do. The bigger risk is visiting a malicious website, not JavaScript itself. If you are concerned about a specific site, you can block JavaScript for just that site using an extension, but this is rarely necessary.

Will turning JavaScript on slow down my browser?

JavaScript is on by default in all modern browsers, so if you are using Chrome, Firefox, or Edge, it is already running. Turning it on in Safari will not noticeably slow down your computer. If your browser feels slow, the cause is usually too many extensions, too many open tabs, or a website with poorly written code — not JavaScript itself.

Can I turn JavaScript on for some websites but not others?

In Safari, you can turn JavaScript on or off globally, but not per-site. If you want to block JavaScript on specific websites, you can use a browser extension like uBlock Origin or NoScript, which let you choose which sites can run JavaScript. Most people do not need to do this.

What if I do not know whether JavaScript is on?

Visit a website that uses JavaScript heavily, like Gmail or Google Maps. If the page loads and works normally, JavaScript is on. If the page looks blank or shows an error, JavaScript might be off. You can also check by opening the browser console — press F12 or Ctrl+Shift+I, click the Console tab, and type console.log("JavaScript is on"). If you see the message, JavaScript is working.

Do I need to restart my browser after turning JavaScript on?

No. In Safari, the change takes effect when ready. In other browsers, you just need to reload the website you are visiting. You do not need to close and reopen the browser.