Document domain determined incorrectly after a redirect
|Cc:||trev, kzar, sebastian, greiner||Blocked By:|
Description (last modified by trev)
How to reproduce
- whitelist theatlantic.com
- go to http://theatln.tc/2bPtk9V
- the link above will redirect to http://www.theatlantic.com/business/archive/2016/08/californias-smart-new-retirement-plan-and-the-industry-that-opposes-it/498038/?utm_source=atlfb
- the page is not whitelisted
- the page should be whitelisted, the ads visible, should be exactly as in ABP for firefox
If I remove theatlantic.com from whitelisted domains and add theatln.tc
the landing page: http://www.theatlantic.com/business/archive/2016/08/californias-smart-new-retirement-plan-and-the-industry-that-opposes-it/498038/?utm_source=atlfb
...will be whitelisted !
chrome.webNavigation.onBeforeNavigate isn't being triggered after the redirect, it's merely being triggered for the original URL. It seems that we are using the wrong callback here - we shouldn't get the original URL in the first place because there is no document associated with it. Also, I suspect that onBeforeNavigate doesn't actually mean that the previous document is unloaded or that the navigation will definitely occur.
What to change
The chrome.webNavigation.onCommitted callback seems more appropriate here, as this one will only fire when the current document is replaced - which is what we need.
Change History (8)
comment:1 Changed 5 months ago by trev
- Priority changed from Unknown to P1
- Ready set
- Summary changed from different behaviour in ABP firefox / chrome regarding whitelisting domains to Document domain determined incorrectly after a redirect
comment:6 Changed 4 months ago by trev
- Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
- Resolution set to fixed
- Status changed from new to closed