Cookie banner detection/clicking can fail if the banner shows up late due to slow load
Categories
(Core :: Privacy: Anti-Tracking, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: pbz, Assigned: pbz)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1793782 - Add a test page that shows a cookie banner shortly after a slow page load. r=timhuang!
48 bytes,
text/x-phabricator-request
|
Details | Review |
We currently run our cookie banner detection code on DOMContentLoaded
. If we can't find a visible cookie banner element at that point, we will register a MutationObserver
to observe DOM changes within the next 5 seconds until giving up.
This behavior is problematic for cases where the total site load takes longer than 5 seconds and the banner shows up late, e.g. because it depends on a subresource. In this case we will fail to handle the banner.
We can address this issue by registering the MutationObserver
on DOMContentLoaded
and unregistering it only after the load
event. That is, starting the unregister-timeout when we observe the load event.
There may still be edge cases where banner show up after our default timeout of 5 seconds, even after page load. I'm considering this out of scope for this bug.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D159386
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a26c89a3b18d
https://hg.mozilla.org/mozilla-central/rev/7f8e72f11548
Description
•