Hacker News new | ask | show | jobs
by Ennea 1542 days ago
To be perfectly honest, I cannot even remember making that change, but also couldn't find any info on whether Firefox or some extension may have done this. I will leave it disabled, however, because its purpose seems to be analytics, and opting out of (at least some of) them this way seems like a good idea.

Since disabling it this way removes the `sendBeacon` function from existence, you should just be prepared to properly handle its absence.

1 comments

Is it always about analytics? Or is it ocassionaly also a useful API for other tasks?

I know little about front end JS dev, but the docs say it’s just a way to send an asynchronous request (no response) with a guarantee that the the request will be sent out, even if the page starts unloading. That’s apparently not a guarantee with the two other to send requests - XmlHttpRequest and fetch api.

The beacon api was created specifically to be a lightweight method for telemetry/logging