What is Safari Content Blocking?

All you really need to know

Content blocking is a method for blocking content websites try to download to your computer or mobile device. Apple introduced it to Safari in iOS 9 and OS X 10.11 (El Capitan). Learn more about content blocking in this explainer from iMore.com.

This article applies only to our legacy Safari extension, not to our Mac app. Safari content blocking is built into the AdBlock for Safari Mac app. You will not see it in AdBlock's options and and it cannot be turned off. Learn more about what else is different between the AdBlock extension and the AdBlock Mac app.

"Safari Content Blocking" is a setting in the AdBlock for Safari extension (again, not the Mac app) that tells AdBlock to use this method rather than the old way of blocking ads. With Safari content blocking on, more ads are blocked (goodbye, ads in Flash videos and games) and Safari runs 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 allowlist 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. That is, to pause or resume AdBlock, uncheck or select Enable AdBlock in Safari > Preferences > Extensions.
  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.

Turn Safari content blocking ON if:

Turn Safari content blocking OFF if:
  • Do you want to support websites you love by allowlisting their ads? Turn content blocking OFF.
  • Do you need to use several filter lists at the same time? Turn content blocking OFF.

How to turn content blocking on and off

  • On your Mac, turn content blocking on and off in AdBlock's options, on the "GENERAL" tab.
  • 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 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 allows ads on thousands of websites.
  • You can’t allowlist specific YouTube channels. 
  • You can’t turn off allowlisted 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 allowlist 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.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.