Script blocking in Safari on macOS

What are scripts?

Scripts are most commonly small JavaScript files used to provide enhanced interactivity to websites. For example displaying a modal window when hovering your mouse over a particular element on a page, or changing the contents on a page without a full reload on a button click.

So whats the problem with them

On well designed and privacy respecting websites, nothing. But on the modern web, the main business model is unfortunately advertising related. 😕 This in not inherently a bad thing, but it can lead to some pretty sneaky tactics. For example, scripts can be used to track your mouse movements, the contents of your clipboard, browsing history, or perhaps even scroll position on pages to try and guess what you spend most of your time looking at.

Not so cool right.

What can I do to enhance my privacy while browsing

A really simple brute force solution would be to disable all scripts, as most modern browsers have an option to do exactly this. While this would work, you would likely lose the extra interactivity mentioned earlier, and probably even break most websites.

A better solution

Probably the best option to keep all the benefits but reduce the problems of scripts would be to selectively block scripts. Maybe the most powerful tool to achieve this might just be NoScript, a web extension for Chrome and Firefox based browsers. Unfortunately NoScript is not available for Safari on macOS. But fortunately, you could use something like Minim to achieve very similar results.

Minim for Safari

Minim is a standalone macOS app, with an integrated Safari extension which gives you the ability to selectively block scripts. I say selectively, because it is not as fine grained as something like NoScript, as script blocking is a subset of Minim’s features. With Minim, you can block all scripts originating from a website (usually not necessary), or more usefully from third party websites.

As a rule of thumb, you can generally safely block all data not originating from the website you are currently browsing, and not degrade your browsing experience. Although there are obviously cases where this is not desirable. So having a way to be selective in what you block is crucial.

In general, with something like Minim, blocking third party scripts should give you the best online experience, by blocking most of the advertising scripts but (hopefully) allowing through any useful scripts you want. You can easily configure Minim to block ALL third party script, and then if any of your favorite website break, add an exception for them. Or alternatively, you could also set Minim only block third party scripts from some websites you choose.

An added benefit of script blocking is faster page loads. 🎉

You can take a better look at Minim over at its home:, or on the Mac App Store