-
Notifications
You must be signed in to change notification settings - Fork 83
Ad blocking differs from Adblock with the same rules #260
Comments
Never mind, I see that it did block some ads, just not all. Investigating. |
Never mind, see findings below. |
Ok, regarding The resource of the ad itself is |
These are hidden elements. Using the real ABP, I see the image being downloaded, but not being shown. So since HTTPSB doesn't support element hiding, this is the expected behavior. |
This is what my tool tells me for ABP vs HTTPSB. ABP:
HTTPSB:
So the images you see on the right are coming from |
I believe that would be the ABP filter that hides the images you see in HTTPSB:
In EasyList. |
Try this list in ABP, https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt, which is the one really used by HTTPSB, and the ad will not be hidden by ABP. |
You are right. There were Element Hiding Rules in Easylist-Germany. So it's rather a bug in Adblock that it didn't show that such rules were triggered. |
Given that changed my mind yet another time, this one needs reopening, to track the progress of currently unsupported link-based cosmetic filters. (I went with the most common filters first -- next are the link-based ones). |
Related: #276 |
Actually for this one, a better solution is to use a custom filter like:
Maybe it could be proposed for inclusion on ABP forum? |
As far as I can tell, 93725cb fixes the issue. |
Raymond, I've found one example where adblocking still differs between Adblock and HTTPSB. If I do a search in I can see ads at the top of the result page with HTTPSB but none if Adblock is enabled. In both extensions the only filter reported is ?adtype= So I guess that an Element Hiding Filter in Adblock is triggered which is not reported (as in the example above). If so - shouldn't it also work in HTTPSB? |
I don't see the ad. I disabled cosmetic filtering, and it appeared. Enabled cosmetic filtering, and it disappeared. Looking up the ad, I see To help you find it, the ad comes not long after this HTML comment: |
Ok found the filter in EasyList, it is:
|
I see the |
First screenshot has the information I need. So apparently the rules injected by HTTPSB (if they were) aren't seen by the element. Now the key for me is to reproduce and then from this point I can investigate why the injected CSS rules are not seen. |
@tlu1024 Do you only have
in "Your block rules". Those are 2 filters in |
No, I have both lists checked. Nevertheless I added both rules to the block rules - but no improvement ... |
Weird, I see the ad for half a second then it disappears every time. |
There is a mistake in my injected rules:
The There are various ways I can apply the rules. Actually, I want to try to not inject a style, but rather change the style of the element directly through the DOM, so this way no need to create an expensive (I believe) style element. This way of doing is of course possible given that only the CSS selectors which matter to a page are used. |
Now I get ads when I check |
I see, the cosmetic filter parser chokes with that file, there is a line @tlu1024 you have this list enabled? |
Yes, I have! I just disabled it and searched again for "tree" - and got the same result like my-password-is-password : There's an ad that disappears after a second or so. |
Ok so its the parser. Still I will see what can be done at the same time for the second-long delay, it can be annoying, but ultimately, all is asynchronous so it's impossible to guarantee 100% that the ads will never appear even a fraction of second, I can try to experiment to minimize though. |
By the way, thanks to @my-password-is-password, I would still be spending time trying to figure what is wrong, who knows for how long. |
No problem. About the second-long delay, if you observe the DOM at |
I can live with that - don't devote too much time into it ;-) Thanks to @my-password-is-password also from my side! |
So at |
// Any sequence of Raymond, are your sure that's correct? In Eayslist are many rules with 3 #. |
I uploaded an old version HTTPSB that I messed around with mutation observer long time ago. I removed everything from contentscript.js leaving just the observer. To test it go to startpage.com and search for anything. It hides the div with id 'sponsored' at document_start. But the page seems to load a little slow this way. |
In your version there is no message detailing the content of the page sent to the background page, and no waiting for the answer from the background page. This is the way cosmetic filters are implemented in HTTPSB, the other alternative without messaging is to inject everything indiscriminately (the ABP way). I can't do it this way, it's abusive to the browser. Now I instrumented the number of mutations, and it's just not an option to send a message for each mutation events, it was like a firehose of events, and now imagine that each of these result in a message sent call and corresponding handling of the received answer, the overhead is going to be over the top. And that is for a simple page. A real proof of concept needs to take into consideration the reality, which is to support over 20K filters in EasyList. It gets worst quick with Fanboy annoyance, etc. Your version is hardcoded to find a I have in mind something else I want to experiment, which I will detail in a TODO issue. |
Thinking more about this, there could be a mixed approach: I could query the selectors matching a specific domain name at |
Fetching and applying domain-based selectors after |
Startpage has been the only site that I can tell that a cosmetic filter is being used so your improvement is probably all you need. |
Would you make a option to only use domain-based selectors? Since from a security and privacy point of view, generic element hiding rules are not that useful like generic filter rules, someone like me might only want element hiding rules in some regularly visit sites. Or even better, make the parsed domain-based selectors list be scoped when there is a corresponding site in scoped rules of HTTPSB, and can be encoded as a recipe alongside with scoped rules. This way we can have a small "static" (only need a domain/site name lookup which must be done for scoped rules anyway) element hiding stylesheet for those sites. For generic sites, one could still choose to use generic selectors after scope lookup. For those generic selectors that might be useful for scoped filter sites, one could let user select whether add those selectors to scoped rules when load a page from those sites. Maybe add a selector list in the "Scoped rules" tag for easy management. |
Just another site where this happens. So startpage.com is not the only example. It's http://www.cboe.com/data/mktstat.aspx . With |
I can confirm the fix works well on my side (I see you are using Fanboy). I hope to upload a new revision today (currently code reviewing). I am becoming more fearful of updating, the user base has kind of grown a lot last week (because of this), and my worst fear is to break important functionality in the extension because I overlooked a bug. |
Congratulations - great news! Regarding bugs - may I repeat my question asked above? There are many filters in Easylist like ###AdAuth4 So, shouldn't the patch rather say: Perhaps I'm misunderstanding something .. |
Sorry I hadn't noticed your comment. Yes my comment in the code is wrong, it should be "any sequence longer than one", since at this point I am testing the selector only. |
Any new issue similar to this one will have to go into a new bug, as just like the last one, it will likely be different code bug. |
@noblehng Sorry, I saw your comment but forgot to come back to it.
I think this is something which ABP should do, so all users of these files would benefit from the finer granularity. I am not too fond of adding yet another checkbox, which requires to explain what it does etc. However I could definitely add EasyList without element hiding filters as a choice, so that if you check "Parse and enforce element hiding filters" you would not suffer the memory footprint of the thousands of cosmetic filters in the main EasyList file, just those in whatever regional list you are using.
Not sure I understand this part. When visiting a site, only the cosmetic filters which are meaningful to the sites are used anyways (this is true for generic filters too, as opposed to ABP). So if on |
Today I stumpled upon this site:
http://www.heise.de/newsticker/meldung/Firefox-beerdigt-Plaene-fuer-Werbung-auf-Tab-Seite-2186990.html
In HTTPS Adblock complex rules are enabled. If I load above site with the Adblock extension disabled, I see several ads ("Anzeige") in the right column.
Some of the links of those ads are:
I don't see those ads if Adblock is enabled. The funny thing is that both HTTPSB and Adblock seem to apply the same blocking rules.
Those are the ones used by Adblock:
And those are the requests blocked by HTTPSB (according to its statistics tab):
Shouldn't the site look identical if both extensions block the same requests? I don't see Element Hiding Rules applied by Adblock.
The text was updated successfully, but these errors were encountered: