Mock navigator.sendBeacon for compatibility when beacons are disabled
Categories
(Core :: Privacy: Anti-Tracking, enhancement, P3)
Tracking
()
People
(Reporter: allo, Assigned: celenity, Mentored)
References
Details
(Keywords: good-next-bug, priv-triaged, Whiteboard: [tor])
Attachments
(1 file)
Firefox allows for privacy to disable beacons using the setting beacon.enabled=false, but some webpages break when the method navigator.sendBeacon is not available, namely NextJS seems to expect it and have no fallback, causing JavaScript errors that make sites unusable.
A good solution would be to mock the function to be available but do nothing. This would be the most privacy preserving as the site cannot know if the tracking was sent or not and would probably work out of the box as the function is asynchronous, so it should not make a difference for the site if the beacon is queued or discarded.
Related: Bug 1454252
Found when searching for the option more reports of broken sites:
https://news.ycombinator.com/item?id=30924835
https://www.camp-firefox.de/forum/thema/135242-login-auf-web-de-funktioniert-nicht/
https://www.camp-firefox.de/forum/thema/136751-ebayproblem-mit-about-config-schalter-beacon-enabled/
Updated•4 months ago
|
Comment 2•4 months ago
|
||
Tor Browser also disables this pref. Would be nice to increase compat for them.
Comment 3•3 months ago
|
||
Thanks for filing this enhancement request and for providing the details. Changing the status to NEW.
Updated•1 month ago
|
Comment 5•16 days ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:celenity, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Went ahead and added the Plan Changes
action in Phabricator; I'm going to look at adding the requested tests when I get a chance, appreciate the patience here.
Updated•15 days ago
|
Comment 7•11 days ago
|
||
(In reply to Manuel Bucher [:manuel] {{ fyi: PTO Jul 26 - Aug 17 }} from comment #2)
Tor Browser also disables this pref. Would be nice to increase compat for them.
It's been over year since Base Browser stopped doing this, for compat (instead we rely on NoScript to no-op it)
Preferably, this would be nice to have under RFP - i.e ignore the pref, enable the API, but never send anything
Description
•