All you really need to know

"Safari content blocking" is a feature that allows AdBlock for Safari to block more ads than ever before (goodbye, ads in Flash videos and games) while making Safari run faster.

There are some things to keep in mind:
  1. With content blocking on, you can't support websites you love by allowing their ads to appear or whitelist specific YouTube channels to support your favorite YouTubers.
  2. You have to pause and unpause AdBlock through Safari's extension preferences, instead of using the AdBlock button on the extensions toolbar.
  3. You can only have 50,000 filter rules in use at one time.
    You might be thinking, "50,000 filters, so what? That’s plenty!" Well, not really. Some of the filter lists contain tens of thousands of filter rules! For instance, if you have AdBlock Custom, EasyList, and one or two optional lists turned on, you might have to turn one of them off before you can add a language-specific list. If you see the following error message with Safari Content Blocking on, it means that you have subscribed to too many filter lists: The number of filter list rules exceeds the 50,000 limit, and has been automatically reduced. Please unsubscribe from some filter lists or disable Safari Content Blocking!

So, summing up, how do you know whether to use Safari content blocking or turn it off? It depends on what's most important to you.

But:
  • If you want to support websites you love by whitelisting their ads, turn content blocking OFF.
  • If you need to use many filter lists at the same time, turn content blocking OFF.


How to turn content blocking on and off

  • On your Mac, you can turn content blocking on and off in AdBlock's options, on the "GENERAL" tab.
  • On your iPhone or iPad, it's in Settings > Safari > Content Blockers.


The details

Content blocking gives developers a new way to write Safari extensions that block ads. In our case, it allowed us to rewrite AdBlock to make browsing in Safari faster and to block more ads than ever before.


Safari runs faster

If you're not interested in gory technical details, just say to yourself, "Safari runs faster? Cool!" and skip to the next section. :)


Before content blocking came along, the rules that determine what should be blocked and hidden were written in JavaScript, an interpreted language. With content blocking, those rules are converted to compiled code. In general, JavaScript extensions are slower than compiled code. (StackExchange has a nice explanation of the difference between compiled and interpreted languages for those of you in need of some serious geek cred.)


AdBlock blocks more stuff

Before content blocking, we weren’t able to block ads in Flash videos and games unless they were on YouTube.com. With content blocking, now we can. (“You’re welcome.” — Apple) That means you no longer need to sit through ads before your video starts or switch to Chrome to watch videos without ads.


Now, the downside

While content blocking allows us to do some things we weren't able to before, it also removes some functionality you may be used to.

  • You can’t whitelist (allow ads to show on) individual pages or domains. That means that if you turn on content blocking, we'll automatically turn off the Acceptable Ads filter list, which whitelists thousands of websites.
  • You can’t whitelist specific YouTube channels. 
  • You can’t turn off whitelisted filters in a filter list.
  • You have to enable and disable AdBlock through Safari’s extension preferences rather than on the AdBlock button.
  • You can only have up to 50,000 filter rules in use at the same time.
  • Not all filters are compatible with content blocking. That means some custom filters may not work properly with content blocking on.
  • Power users who write lots of custom whitelist filters may find that some of them don’t work. In that case, they’ll need to turn off content blocking and restart their browser to use the old API. Note, however, that this workaround won’t be available forever, since Apple will likely revoke all access to the old API at some point.


If you prefer to use Safari without content blocking, that's fine! Just turn off that setting to get back the AdBlock experience you're used to.


By the way, if you have an iPhone or iPad...

AdBlock is available for Safari on iOS devices. Please follow these instructions to install AdBlock for Mobile on your iOS device.