-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page Unload Beacons #58
Comments
This was discussed at the WebPerfWG and met with at least partial excitement. |
The repo is now live at https://github.com/WICG/unload-beacon |
Truly curious: if browsers like Brave consider (note, consider, as far as I can tell they don’t necessarily do it) blocking |
That's a tangent, but I believe that reporting and monitoring is a critical part of modern developement. Browsers that don't believe this to be the case would be able to block this beaconing mechanism, similarly to other ones that you mentioned. (but probably not other beaconing methods, based on image requests or fetch) |
Makes sense. I guess most of us agree that reporting and monitoring is crucial, and this proposal is definitely worthwhile exploring and an improvement over the status quo. And as even someone on the Brave issue acknowledges, these methods aren’t exclusively used for tracking purposes. |
Introduction
Beacons on the web are a common tool for web sites to send small amounts of data to an origin server, often used for reporting telemetry and analytics. For several reasons, though, that API (as well as other methods such as XHR, image beacons, or direct use of Fetch) is often unreliable, and difficult to use to accurately report full-page-lifecycle metrics. (See @nicjansma's excellent survey of existing techniques and their reliability in practice here)
This proposal is for an API which attempts to improve some on some of those concerns, with reliability as a primary motivation, and designed to integrate with the browser's back-forward cache. The basic mechanism involves the web site creating a "Pending beacon", which can be populated with data like existing beacons. This beacon, by default, is not sent until the page is about to be unloaded from the browser's memory, but can optionally be sent a short time after entering the bfcache, or even immediately if desired.
Read the complete Explainer.
Read the draft specification.
Feedback
I welcome feedback in this thread, but encourage you to file bugs against the draft specification.
The text was updated successfully, but these errors were encountered: