A page that keeps redirecting, a form that misbehaves, or a site you want to see without scripts: all good reasons to switch JavaScript off for a moment. On current iOS, the switch is at Settings > Apps > Safari > Advanced > JavaScript. Safari’s settings show one switch rather than a per-site list, so it applies across Safari.
That makes it best used as a short test with an undo.
Switch JavaScript off, test the page, switch it back
Keep the problem page open in Safari so you can compare it before and after.
- Open the Settings app and tap Apps.
- Tap Safari.
- Scroll down and tap Advanced.
- Turn off JavaScript.

- Go back to Safari and reload the page. A page that is already open may not change until it reloads.
- See what changed. If the redirect or stuck overlay disappears, a script on that page is a likely cause. If nothing changes, look elsewhere.
- Return to the same Advanced screen and turn JavaScript back on.
Step 7 matters, since leaving the switch off can affect other sites you visit. Apple’s own page on Safari not loading websites lists turning JavaScript on as a fix, so a forgotten switch can look like a broader Safari problem. If sites still misbehave afterward, the walkthrough on how to enable JavaScript on iPhone has more to check.
When the JavaScript switch is missing or won’t move
Check these in order, starting with the most common.
- You are on the wrong Advanced screen. Other apps have Advanced settings too. The Shortcuts app, for one, has an Advanced page that has nothing to do with Safari. Make sure you came through Apps > Safari.
- The iPhone is managed by a school or employer. Apple’s device management restrictions include one where Safari ignores all JavaScript on websites. Apple doesn’t say how the switch looks in that case, but if your iPhone is managed, only the organization’s administrator can change a policy like that.
- A Screen Time limit may be involved. Screen Time can restrict apps and content, and some guides report that it can hide Safari’s settings. Apple’s pages don’t tie it to this switch specifically, but it is worth checking your iPhone’s restrictions.
What stops working first
Apple notes in its Mac documentation that websites use JavaScript for buttons, forms and other content, and that some sites can’t work properly without it. In practice, these are the places you are most likely to notice.
| Part of a site | What you may see |
|---|---|
| Menus and buttons | A tap does nothing, or a menu won’t open |
| Sign-in and online banking | The form won’t submit or the page stays blank |
| Web mail and web apps | The app doesn’t load at all |
| Shopping carts and checkout | Items won’t add, or payment won’t go through |
| Video players | The player is blank or won’t start |
| Articles and plain pages | Often still readable, sometimes with fewer overlays |
None of this is permanent. It only lasts until you turn the switch back on.
Pick a narrower fix when you know the problem
If the test points to a specific annoyance, a smaller tool usually handles it without breaking the rest of the web.
| Problem | Try this instead |
|---|---|
| Pop-up windows | Turn on Block Pop-ups at Settings > Apps > Safari, as Apple describes. To make exceptions, see how to allow or manage pop-ups on iPhone. |
| Clutter on an article | Use Safari Reader, which Apple says hides navigation menus and other distracting items. |
| Ads across many sites | Look for a content blocker in the App Store and follow its setup instructions. |
| One site you never want to open | See how to block a website on an iPhone. |
Older iPhones and the Mac
If you don’t see Apps in Settings, your iPhone is probably on an older iOS version. Third-party guides place that layout at iOS 17 and earlier. There, look for Safari in the main Settings list, then continue to Advanced and JavaScript.
A Mac has its own separate option: in Safari, choose Safari > Settings, click Security, and clear Enable JavaScript. The full steps are in the walkthrough on how to disable JavaScript in Safari on a Mac.
Apple’s steps here cover Safari only. If you use another browser on your iPhone, look in that app’s own settings.
Safari JavaScript questions
Will turning off JavaScript stop pop-ups?
Don’t rely on it for that, since Apple doesn’t describe it as a pop-up control. Block Pop-ups is the setting Apple provides for this job, and it leaves the rest of the site working.
Why does the page look the same after I turned it off?
Reload the page first. If it still looks the same, the page may not rely on scripts for what you are seeing, which itself tells you JavaScript isn’t the cause.
Does turning off JavaScript make me private online?
Don’t count on it. The Apple pages cited here don’t describe it as a privacy tool, and nothing in them suggests it hides your IP address.
When your test is finished, open a site you use every day. If its menus and sign-in work normally, JavaScript is back on and you are done.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He started on a university help desk, spent years as the IT person for small businesses, and has been writing tech guides full time since 2020. Each guide is checked on a device he owns, and re-checked when a menu moves. More about Kermit.