Skip to content

do not disable navigator.sendBeacon()

As I have discovered today, some websites (e.g. Vercel) may fail if navigator.sendBeacon is not defined, as they do not expect it missing. As I didn't know, what navigator.sendBeacon was, I looked it up and found the following:

The sendBeacon() method returns true if the user agent successfully queued the data for transfer. Otherwise, it returns false. (source)

My idea would be to patch navigator.sendBeacon to always return true (or false). This way, websites won't break, while we wouldn't send any data to them. I don't know whether this is simple to implement (as it is currently just an about:config flag), but such feature would be very nice to have!