Skip to content

Allow or Block JavaScript in Safari on Mac

Do you want to control whether websites can run JavaScript in the Safari browser? Learn how to configure JavaScript settings for specific sites.

JavaScript helps make websites interactive and modern. However, it can also be misused for hacking and phishing. Hence, it is recommended to block JS when visiting unsecured websites.

Safari has JS enabled. However, we can disable it using a checkbox on the Safari preferences window.

In this guide, we have shared the steps to configure the JavaScript settings in the Safari app.

Block the JavaScript Execution

We must have a smooth and fast experience while browsing websites. The unexpected crashing of websites is irritating and also tiresome. Here are the steps to follow:

  1. Launch the Safari browser app on a Mac computer.
  2. Select Safari from the menubar options.
  3. Choose the Preferences… option under the Safari menu.
  4. Switch to the Security tab within the Preferences popup window.
  5. Disable the Checkbox against Enable JavaScript.
    Disable and Block JavaScript on Safari MacOS

It will block the JavaScript execution for all the websites.

Allow the JavaScript runtime

There are a few websites that use JavaScript to give out essential information. While browsing them, we should know how to allow JavaScript execution for such websites. Here are the steps to allow:

  1. Launch the Safari app on a Mac computer.
  2. Select Safari from the menubar options.
  3. Choose the Preferences… option under the Safari menu.
  4. Switch to the Security tab within the Preferences popup window.
  5. Enable the Checkbox to Enable JavaScript.
    Enable and Allow JavaScript on Safari MacOS

This will allow the browser to run the JavaScript code on the websites over the Safari browser on any Mac machine.

Bottom Line

Sometimes websites may crash due to excessive load on the server or simply because Javascript used by the website has taken up all the capacity of your RAM. This certainly makes browsing inconvenient and time-consuming. To avoid it all, we should know the use of the Safari block javascript feature.

Similarly, you can allow or block JavaScript in Safari on iPhone or iPad. You might perhaps face some issues after blocking JavaScript. Hence, it suggested blocking JS on selected sites.

Lastly, if you've any thoughts or feedback, then feel free to drop in below comment box. You can also report the outdated information.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases; of course at no extra cost to you (indeed, you may get special discounts).
Kushal Azza

Kushal Azza

Kushal Azza is a Google Certified IT Professional, Digital Content Creator, and Go-To Digital Marketer with Engineering Degree. He has over a decade of experience solving tech problems, troubleshooting, and innovating digital solutions. Follow him on Twitter and LinkedIn.

Leave a thought or feedback

Please leave a descriptive comment or feedback with your real name. Our human moderator vets every comment, and it may take 24 to 48 hours to get published or rejected.

Your email address will not be published, and we will never spam your inbox. Required fields are marked *