#7322 closed change (rejected)

Allow more comprehensive $document blocking

Reported by: fanboy Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords: closed-in-favor-of-gitlab
Cc: arthur, kzar, mjethani, mapx, sebastian, greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)


Adblock Plus 3.5
Chrome 71
macOS 10.12


$document should block requests for the root document.

How to reproduce

  1. Add @@ite$image,domain=newser.com and ||yvsystem.com^$document
  2. Open the page http://www.newser.com/story/272065/powerful-tornado-kills-more-than-20-in-alabama.html
  3. Click on the Yavli Ad on the right.

Observed behaviour

Clicking the link in the ad takes you to a URL starting with http://a.yvsystem.com/ in the top frame, but ABP allows the site to load the content.

Expected behaviour

Stop the sites with $document from loading. The filter ||yvsystem.com^$document should block the request to the URL starting with http://a.yvsystem.com/.

This will stop sites using the redirection through adservers method, just another tool to stop this.


This feature was implemented in uBlock Origin in response to a report about malware/phishing sites using top-level redirection (uBlock issue 1013).

Change History (12)

comment:1 Changed 19 months ago by mapx

  • Description modified (diff)

comment:2 Changed 19 months ago by mapx

  • Cc arthur kzar mjethani mapx added

comment:3 Changed 19 months ago by mjethani

To clarify what @fanboy means:

  1. There is a filter in EasyList ||yvsystem.com^$document
  2. Clicking the link in the ad takes you to a URL starting with http://a.yvsystem.com/ in the top frame
  3. uBlock Origin supposedly blocks the request so the navigation is prevented

(Correct me if I'm wrong @fanboy)

In ABP we explicitly ignore navigations in the top frame.

comment:4 Changed 19 months ago by fanboy

Yeah, essentially I'm wanting $document in ABP to block sites outright (similar to ubo), given some adserver sites will use them to redirect.

comment:5 Changed 18 months ago by SMed79

uBlock wiki > Strict blocking ~ https://github.com/gorhill/uBlock/wiki/Strict-blocking

comment:6 Changed 18 months ago by mjethani

  • Cc sebastian added

comment:7 Changed 18 months ago by mjethani

  • Component changed from Unknown to Platform

comment:8 Changed 18 months ago by mjethani

  • Description modified (diff)

comment:9 Changed 18 months ago by mjethani

@fanboy I have rewritten the issue description a bit to conform to how we write these generally, please make corrections as you see fit.

comment:10 Changed 18 months ago by sebastian

  • Cc greiner added
  • Type changed from defect to change

This feature has no use for ad blocking but could enable filter lists that protect the user from accidentally accessing malicious websites. In the past, our stance here was that this isn't the purpose of Adblock Plus, and there are other extensions for this kind of blocking.

I personally don't have a strong opinion at the current point, but we should probably discuss this feature request some more before moving forward. In any case it seems low priority to me.

comment:11 Changed 18 months ago by greiner

Unfortunately, I can't reproduce it but from what I understand, you're saying that the popup is not being blocked and that you'd like to work around that by instead blocking the entire page that's being opened.

If so, wouldn't it make more sense to add an option that closes the tab or prevents it from being opened, similar to popup blocking works, instead of blocking the entire page in it?

In general, I think we should be very careful when retroactively changing the behavior of $document and instead look for alternatives. Also, I'm not too convinced about uBlock Origin's approach because it seems very obtrusive.

comment:12 Changed 13 months ago by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from new to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Note: See TracTickets for help on using tickets.