Opened on 02/05/2015 at 03:17:08 PM
Closed on 02/05/2015 at 03:46:41 PM
Last modified on 05/20/2015 at 02:22:39 PM
#1953 closed defect (incomplete)
ABP in FF is double counting hit stats
Reported by: | passbrains | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Adblock-Plus-for-Firefox | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Platform: | Firefox | |
Ready: | no | Confidential: | no |
Tester: | Verified working: | ||
Review URL(s): |
Description (last modified by trev)
Adapted from https://www.passbrains.com/dashboard/view-ticket.php?ticket_no=ARE-71
Environment
Windows + Vista 64bit + Firefox + English
ABP version Adblock Plus 2.6.7.3895
How to reproduce
Firebox Browser.
- Open Firefox Browser with ABP enabled and load page
http://www.skype-emoticons.com/country-flags.htm
- Add *.png in the filter.
- Ensure *.png filter has 0 hit count (if not reset it).
- Refresh the page and flags are blocked
- Open filter preferences and check hit count for png image filter rule.
Now Repeat the same on Chrome Browser
- Open Chrome Browser with ABP enabled and load page
http://www.skype-emoticons.com/country-flags.htm
- Add *.png in the filter.
- Refresh the page and observe.
4 Check ads count on ABP icon.
See screesnshots for both.
Observed behaviour
Significant difference in Ads blocked/hit count, almost more than 3 times.!!!
On Firefox : shows 816 hits whereas
On Chrome : shows only 243 ads blocked.
Expected behaviour
Ads count and hit count shall not differ significantly for same filter across different browsers.
Attachments (2)
Change History (5)
Changed on 02/05/2015 at 03:17:11 PM by passbrains
Changed on 02/05/2015 at 03:17:11 PM by passbrains
comment:1 Changed on 02/05/2015 at 03:17:14 PM by passbrains
comment:2 Changed on 02/05/2015 at 03:46:41 PM by trev
- Component changed from Unknown to Adblock-Plus-for-Firefox
- Description modified (diff)
- Resolution set to invalid
- Status changed from new to closed
Ads count and hit count shall not differ significantly for same filter across different browsers.
That's a wrong expectation. The browser internals are sufficiently different that this isn't true.
The culprit in this particular case is speculative parsing, a feature available starting with Firefox 3.5. Here are some details on it, but the essence is this: while Firefox is stuck processing a script, it will already try to download these images - just in case (that's the speculative parsing). These downloads are blocked by Adblock Plus and counted as hits. Then the script processing finishes and the browser gets to these images by regular means. Given that they haven't been downloaded before, it tries to download them again - and we block them again. As far as Adblock Plus is concerned, these are two separate download actions and each of them has to be counted.
Note that originally I was unable to reproduce the issue, simply because I had the scripts in question blocked.
comment:3 Changed on 05/20/2015 at 02:22:39 PM by philll
- Platform changed from Firefox/Firefox Mobile to Firefox
Made Firefox and Firefox mobile available as seperate platforms.
1 - 05 Feb 2015 15:16:56 posted by Ross Green
Reproduced.
ABP in Firefox is double counting the hit statistics. If you have the filter window open at the time and visit the flag page, you can see it jump to 241 (close to Chrome's 243) and then jump up to 482.
I also tested this by creating a webpage with a single image, resetting the counter and refreshing the page. It displays 2. A two image page displays 4 and so on.