||site.com^$third-party and ||site.com^$domain=~site.com

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Famlam

||site.com^$third-party and ||site.com^$domain=~site.com

Post by Famlam »

Michael from EasyList suggested we should ask a question that was asked in their forums here.
http://forums.lanik.us/viewtopic.php?f= ... 594#p28411

The question is:
Is there a difference between the results of these rules:

Code: Select all

||site.com^$third-party
||site.com^$domain=~site.com
and

Code: Select all

||site.com^$~third-party
||site.com^$domain=site.com
[/size]

In my opinion this is true:
image domain --- page domain --- result
site.com --- site.com --- allow the image to load
site.com --- site2.com --- block the image
site.com --- a.site.com --- allow the image to load
a.site.com --- site.com --- allow the image to load
a.site.com --- a.site.com --- allow the image to load
And I can prove that by doing this:
0. Disable all subscriptions to make sure all blocked things are because of the filters mentioned below:

1. Add a filter called ||google.com^$domain=~google.com
2. Visit http://groups.google.com/group/adblockforchrome-dev/: nothing blocked
3. Visit http://www.24vandaag.nl/: all google.com things blocked
4. Add a filter called ||google.com^$third-party and remove the other
5. Visit http://groups.google.com/group/adblockforchrome-dev/: nothing blocked
6. Visit http://www.24vandaag.nl/: all google.com things blocked

7. Add a filter called ||google.com^$domain=google.com
8. Visit http://groups.google.com/group/adblockforchrome-dev/: everything blocked
9. Visit http://www.24vandaag.nl/: nothing blocked, except for items in an iframe loaded from google.com
10. Add a filter called ||google.com^$~third-party and remove the other
11. Visit http://groups.google.com/group/adblockforchrome-dev/: everything blocked
12. Visit http://www.24vandaag.nl/: nothing blocked, except for items in an iframe loaded from google.com

However 'michaeltherobot' says
For
||site.com^$third-party
, if I visit sub.site.com and there is a site.com image on it, it will be blocked.
This is because third-party rules are activated unless the document domain (sub.site.com) exactly matches the rule domain (site.com). These two domains don't match, so the rule is activated and the image is blocked.

For
||site.com^$domain=~site.com
, if I visit sub.site.com and there is a site.com image on it, it will be shown.
This is because ~site.com keeps the rule from activating on site.com or any of its subdomains. sub.site.com is a subdomain of site.com, so the rule is not activated and the image is shown.
Famlam

Re: ||site.com^$third-party and ||site.com^$domain=~site.com

Post by Famlam »

Never mind. I already noticed it:
thirdparty looks at the second + top domain name only (simply said)
Locked