JavaScript is on by default in Safari, so you probably don't need to change anything

Safari enables JavaScript automatically when you install it. Most websites you visit every day — Gmail, Google Maps, YouTube, your bank — rely on JavaScript to work at all. If JavaScript were off, those sites would be broken or blank.

The only reason to look for JavaScript settings is if a website tells you JavaScript is disabled, or if you deliberately turned it off and now want to turn it back on. Even then, the setting is not where most people expect to find it.

Key Takeaways

  • JavaScript is turned on in Safari by default and you should leave it that way unless a specific website tells you it is off.
  • If you need to check or change the setting, go to Safari menu → Settings → Security and look for "Enable JavaScript".
  • The checkbox next to "Enable JavaScript" should have a checkmark; if it does not, click it to turn JavaScript back on.
  • After you change the setting, reload the website you were visiting by pressing Command+R or clicking the reload button.
  • If a website still does not work after you turn JavaScript on, the problem is usually something else, not JavaScript.

Where to find the JavaScript setting in Safari

Open Safari and click the word "Safari" in the menu bar at the top of your screen. A dropdown menu will appear. Click "Settings" (on newer Macs) or "Preferences" (on older ones). A window will open.

Click the "Security" tab. You will see a list of checkboxes. Look for the one that says "Enable JavaScript". If the box has a checkmark in it, JavaScript is on. If the box is empty, JavaScript is off.

How to turn JavaScript on if it is off

Click the empty checkbox next to "Enable JavaScript". A checkmark will appear. Close the Settings window by clicking the red circle in the top left corner.

Go back to the website that was not working and reload it. Press Command+R on your keyboard, or click the curved arrow button on the left side of the address bar. The page will reload with JavaScript now active.

Why a website might say JavaScript is disabled even though it is on

Some websites check for JavaScript in a specific way, and Safari's settings do not always match what they are looking for. This is rare, but it happens. If a website insists JavaScript is off even after you have confirmed it is on in Settings, try these steps: close all Safari windows, quit Safari completely (Command+Q), wait a few seconds, and open Safari again.

If the website still says JavaScript is disabled, the problem is usually not JavaScript at all. The website might be broken, your internet connection might be slow, or the site might not work well in Safari. Try opening the same website in a different browser like Chrome or Firefox to see if it works there.

What JavaScript does and why websites need it

JavaScript is a programming language that runs inside your browser. It lets websites do things like respond when you click a button, load new information without reloading the whole page, or play videos. Without JavaScript, most modern websites would be static text and images that do not respond to anything you do.

Turning JavaScript off makes your browser slower and breaks most websites. Some people turn it off for privacy reasons, but Safari has other privacy settings that work better for that purpose — like blocking trackers and not storing cookies. You can use those instead and leave JavaScript on.

Privacy and security concerns with JavaScript

JavaScript runs on your computer, not on the website's server, so it cannot directly steal your passwords or see your files. However, it can track what you do on a website and send that information back to the website's owner or to advertisers. Safari's built-in tracker blocking already stops most of this without you having to turn off JavaScript.

If you are worried about a specific website, you can turn off JavaScript just for that site. Go to Safari → Settings → Security, and at the bottom you will see "Allow JavaScript on these websites" and "Disallow JavaScript on these websites". You can add websites to either list. But for most people, leaving JavaScript on everywhere is the right choice.

Frequently Asked Questions

Will turning JavaScript on make my Safari slower?

No. JavaScript is designed to run fast, and Safari is optimized to handle it. Turning JavaScript off actually makes Safari slower because websites have to reload the whole page instead of updating just the part that changed.

Is JavaScript the same as Java?

No. Java and JavaScript are completely different programming languages with different purposes. Java runs on your computer as a separate program. JavaScript runs inside your browser. You do not need Java installed to use JavaScript.

Can I turn JavaScript off for just one website?

Yes. Go to Safari → Settings → Security and scroll to the bottom. You will see two lists: "Allow JavaScript on these websites" and "Disallow JavaScript on these websites". Type the website address into whichever list you want.

What should I do if a website says it needs JavaScript but I have it turned on?

Reload the page by pressing Command+R. If that does not work, try quitting Safari completely and opening it again. If the website still does not work, try opening it in a different browser to see if the problem is Safari or the website itself.