Some Safari pages come up blank, with missing buttons or a sign-in form that never loads, because JavaScript is switched off. The checkbox in Safari on Mac is global, so one change affects every site you open there.
Open Safari's Security settings, clear or select Enable JavaScript, then reload the tab. If the page still misbehaves, check the separate cookie and download permissions.
In this guide, I have covered:
Contents
Where Is Safari’s JavaScript Setting on a Mac?
You suspect Safari is refusing to run scripts and want to see the switch for yourself. It sits in the Security tab, and one checkbox governs every website you open in that browser.
- Open the Safari app on your Mac.
- Choose Safari from the macOS menu bar.
- Choose Settings….
- Select the Security tab.
You’ll know you’re in the right place when the Enable JavaScript checkbox appears in front of you.
TIP: On older macOS releases the menu item is still called Preferences…. The JavaScript checkbox stays in the Security section either way.
Block JavaScript for Every Website
Sometimes you want to see what a page looks like with no scripts running, or you need them off everywhere for a while. Clearing the checkbox does exactly that across all sites in Safari on that Mac.
Clear the Enable JavaScript checkbox on the Security tab.
Reload the affected tabs to apply it. Buttons, forms, and content that depend on scripts go missing, while simple pages built from static HTML usually look normal.
Allow JavaScript Again
A site that used to work now feels broken: menus won’t open and the sign-in box never appears. Select the same checkbox to bring scripts back.
Select the Enable JavaScript checkbox on the Security tab.
Reload the tab and the change takes effect. Menus, sign-in forms, maps, and media controls respond again if JavaScript was the only thing missing.
Why There Is No Per-Site JavaScript Switch
You want scripts on for a couple of trusted sites and off for everything else. Safari on Mac doesn’t work that way.
Website settings in Safari do offer per-site controls for pop-up windows, page zoom, automatic media playback, and access to the camera or microphone. JavaScript isn’t one of them.
The Enable JavaScript checkbox under Security is global. Safari’s standard settings can’t keep scripts enabled for most sites while disabling them for one domain.
What Stops Working When JavaScript Is Blocked
Turn scripts off and a surprising number of everyday features go with them. Sign-in and payment forms, shopping carts, comments, maps, video players, and pages that load more content as you scroll all rely on JavaScript.
You may still see the site’s logo and text while its buttons and form fields are missing. That gap is the usual giveaway.
Blocking scripts does not make an unsafe site safe. It stops JavaScript from running, but it doesn’t repair the site’s HTTPS connection or prove the site can be trusted.
If the missing piece is a download, the site’s download permission may be the cause instead. Safari’s controls for allowing or denying website downloads are separate from the JavaScript setting.
Troubleshoot a Site That Still Does Not Work
You turned scripts back on, reloaded, and the page still won’t cooperate. The cause is probably a different control.
A page with no interactive elements at all points to the JavaScript switch. A page that loads fine but won’t sign you in points to cookies. They are independent settings, so changing one does nothing for the other.
If a site’s notification prompt never appears, permission for notifications is another separate setting. The BrowserHow guide to allowing or stopping site notifications in Safari on Mac covers that control.
Check the Scope of the Change
You fixed Safari on this Mac and now wonder whether your iPhone behaves the same way. It doesn’t.
The checkbox affects Safari on that Mac only, so it does not change Safari settings on an iPhone or iPad. You can allow or block JavaScript in Safari on iPhone or iPad with the separate mobile steps.
Frequently Asked Questions
Does Safari on Mac have a per-site JavaScript switch?
No. On macOS, Enable JavaScript is a global option under Security, and JavaScript is not part of Safari’s per-site Website settings.
How do I turn JavaScript back on in Safari on Mac?
Go to Safari > Settings… > Security and select the Enable JavaScript checkbox. Reload the tab and scripts start running again.
Why do some websites fail after JavaScript is blocked?
Many sites use scripts to load content and handle logins, carts, comments, maps, and media controls. Static text may stay visible while the interactive parts disappear.
Does blocking JavaScript make an insecure website safe?
No. It prevents scripts from running, but it does not secure the connection or prove the site is trustworthy. Check for HTTPS before you enter anything sensitive.
Does the Mac setting affect Safari on iPhone or iPad?
No. Each Apple platform keeps its own settings, so changing the macOS checkbox leaves mobile Safari unchanged.
