Scriptlets icon indicating copy to clipboard operation
Scriptlets copied to clipboard

Mock `navigator.sendBeacon` and modify its request body

Open piquark6046 opened this issue 11 months ago • 4 comments

To reduce the browser fingerprinting without a breakage, we can randomize or modify any request body of navigator.sendBeacon.

https://github.com/AdguardTeam/AdguardFilters/issues/200689

piquark6046 avatar Mar 14 '25 05:03 piquark6046

Why can't we simply mock it as noop function using existing scriptlets?

ameshkov avatar Mar 14 '25 06:03 ameshkov

https://github.com/AdguardTeam/Scriptlets/issues/484#issuecomment-2723797345 Already tried. But, I face a breakage if I try.

piquark6046 avatar Mar 14 '25 08:03 piquark6046

This is super strange, in theory sendBeacon is supposed to be "call & forget" type of function

ameshkov avatar Mar 14 '25 08:03 ameshkov

https://github.com/AdguardTeam/Scriptlets/issues/484#issuecomment-2724011028 It seems that they check cookie of its navigator.sendBeacon response at the server

piquark6046 avatar Mar 14 '25 08:03 piquark6046