Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3067 closed defect

Ads remain on previously visited sites after enabling ABP for iOS Safari

Reported by: nicole Assignee: fhd
Priority: P1 Milestone: Adblock-Plus-for-iOS-1.0.0
Module: Adblock-Plus-for-iOS/macOS Keywords:
Cc: fhd Blocked By:
Blocking: Platform: iOS
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by fhd)


iOS 9 Beta, iPhone 6

How to reproduce

If Adblock Plus was previously installed/used:

  1. Disable the Adblock Plus content blocker
  2. Clear Safari's cache
  3. Uninstall Adblock Plus

Reproducing the issue:

  1. Go to, note the ad on top
  2. Install/run ABP
  3. Enable the Adblock Plus content blocker, then immediately switch back to Safari
  4. Reload the tab

Observed behaviour

Ads are still showing

Expected behaviour

Ads are blocked


Switch back to the settings app and wait for about 10 seconds. After that, reloading the page in Safari blocks the ads. The issue can be avoided entirely when waiting for 10 seconds after enabling the content blocker.

Change History (7)

comment:1 Changed 5 years ago by fhd

I was able to reproduce this on Cleared the cache, loaded the site, installed ABP and enabled the content blocker, reloaded, no ads being blocked.

Interestingly however, the workaround of clearing the cache didn't work for me. What worked for me was to disable Acceptable Ads, reload, enable Acceptable Ads again, reload again. That will block the ads, even after clearing the cache again.

comment:2 Changed 5 years ago by fhd

I think I've figured out how to reliably reproduce this on an iPhone 6:

  1. Clear the Safari cache
  2. Disable the Adblock Plus content blocker (if it was installed)
  3. Remove the Adblock Plus app (if it was installed)
  4. Open Safari and load
  5. Observe that there is a banner on top
  6. Install the Adblock Plus app
  7. Enable the content blocker in the Safari settings, then switch back to Safari as fast as possible
  8. Reload the page, notice that the banner is still there

I can not reproduce it if I stay for ~10 seconds on the settings app after enabling the content blocker. Even switching to the settings app, waiting for 10 seconds, then reloading in Safari appears to fix it.

So it seems like the settings app tries to set the content blocker JSON, but if the user switches to another app quickly, it gets killed by the system without having managed to actually set the content blocker.

Nicole reported that clearing the cache helps. That can be explained too: If she had the settings app open long enough for the content blocker JSON to get loaded, that fixes the problem - even though clearing the cache has nothing to do with it.

Last edited 5 years ago by fhd (previous) (diff)

comment:3 Changed 5 years ago by fhd

  • Description modified (diff)

Double and triple checked this together with Sven, and Philip was able to reproduce it as well. That's our issue.

comment:4 Changed 5 years ago by fhd

  • Owner set to fhd
  • Priority changed from Unknown to P1
  • Ready set

comment:5 Changed 5 years ago by fhd

  • Status changed from new to closed

Since this is actually a bug (or well, at least problem) in the iOS settings App and/or Safari, we can't really fix it. We can do two things:

  1. Reduce the number of rules to reduce the loading time
  2. Work around this on the UI

The first option is not something we can realistically do in the near term. So what remains is option number two.

Came up with a quick fix with Sven:

He will think about how we can solve this in a less error-prone manner - one idea would be to first install an empty content blocking list, and then initialise it from the app.

Last edited 5 years ago by fhd (previous) (diff)

comment:6 Changed 5 years ago by philll

  • Platform changed from Unknown / Cross platform to iOS

Added newly available platform value.

comment:7 Changed 5 years ago by fhd

  • Milestone changed from Adblock-Plus-for-iOS-next to Adblock-Plus-for-iOS-1.0.0
Note: See TracTickets for help on using tickets.