Yannick Weiss

No Third Party Scripts

Browsing browsing for a month without third party scripts. With the release of WebKit Content Blockers I wrote a Safari plugin called “Third Party Blocker” which prevents all third party scripts from loading.

It was really easy to write and I recommend you to check it out if you are interested in writing your own Safari plugin. github.com/yene/Third-Party-Blocker.safariextension

Some sites did not work properly so I added a button that lets you add exceptions. This is what I learned:

Embedded Video

The most used third party script that I had to make exceptions for is embedded youtube videos. Even tho the snippet uses iframe it loads a bunch of third party scripts.

CDN hosted libraries

I noticed many website use Google Hosted Libraries for jQuery. Most of them without fallback. 😢

I recommend always hosting your own fallback. Snippet from Stackoverflow

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script>if (!window.jQuery) { document.write('<script src="/path/to/your/jquery"><\/script>'); }

Different Hosts

Some site host their scripts under a separate domain to prevent browsers from sending their cookies around the world.

At the moment there is nothing I can do except allow all third party scripts for this site. I wish there was a way to make a whitelist for common third party hosts.