How to Disable JavaScript in the Safari Web Browser 2022


JavaScript adds dynamic behavior to websites, enhancing them and providing a friendlier experience to viewers. However, because JavaScript is a powerful programming language, people can also use it to write malware, making it unwelcome by many computer users.

JavaScript is enabled by default in the Safari browser on Mac computers and the Apple iPhone and other mobile devices. If you don't want to run it for security reasons, you can turn it off in the Mac System Preferences screen or the iPhone Settings app. Here's how.

This article applies to all versions of Safari and devices with iOS 7 or later.

How to Disable JavaScript in Safari on a Mac

In Safari on Mac, you can enable and disable JavaScript in the Preferences menu. Here's how to do it:

Open Safari.

Open the Safari menu and select Preferences.

The keyboard shortcut for Preferences is Command+, (comma).

Go to the Security tab.

Clear the Enable JavaScript check box to disable the feature.

Some websites may not function as expected while JavaScript is disabled.

How to Disable JavaScript in Safari on an iPhone

On your iPhone or another iOS device, disable JavaScript in the Settings app:

Open the Settings app.

Scroll down to Safari and tap it.

At the bottom of the Safari settings screen, tap Advanced.

Tap the slider next to JavaScript to toggle it to the off position.