I took a little time out today to watch WWDC Session 511 to learn about how Safari Content Blocking will work in iOS 9 and OS X El Capitan. After an hour, I had a little concept app running. I wont really explain the technical details of how the extensions work or how to create them, that is better done by watching the WWDC Session video directly, but I will say its frightfully easy and the code I used for the blocker detailed below is at the bottom of this page.
Ok, so the website I decided to try "fixing", is one that I see linked often, iMore. Let me start this by saying I really like the content that iMore provide and enjoy the personas of their staff on their many podcasts (Debug is one of my favourites!), but I hate the experience of their mobile website as it has several ad's by many different providers, all tracking me across all different sites. They have super tiny 'close' buttons that are near impossible to hit, they follow you as you scroll and there is a slow loading full page interstitial that loads on every page refresh. Urgh! Anyway...
Here is a screenshot of before & after the content blocker has run.
I don't know about you, but I think this website looks a lot more better now. The content I want to see is there in front of me, uninterrupted and free of clutter. (note: I dismissed the App Store banner at the top and couldn't get it to reappear for the second screenshot).
With no content blocked, there are 38 3rd party scripts (scripts not hosted on the host domain) running when the homepage is opened, which takes a total of 11 seconds. Some of these scripts are hosted by companies I know, Google, Amazon, Twitter and lots from companies I don't know. Most of which I assume are used to display adverts or track my activity, as the network activity was still active after a minute of leaving the page dormant. I decided to turn them all off all 3rd party scripts and see what would happen.
After turning off all 3rd party scripts, the homepage took 2 seconds to load, down from 11 seconds. Also, the network activity stopped as soon as the page loaded so it should be less strain on the battery.
I later blocked the CSS div's reserved for ad space and for the rotating carousel at the top as one of the scripts i blocked broke the functionality and I didn't really like it enough to fix it, for details, see the copy of my JSON below.
Would I block content?
Now, this was fun little project to mess around with, but it does give me a moral dilemma. Do I care more about my privacy, time, device battery life & data usage or do I care more about the content creators of sites I visit to be able to monetise effectively and ultimately keep creating content?
Tough question. At the moment, I don't know.
If anyone wants to play around with my (very limited) Safari Content Blocker Extension, here is a copy of my JSON.