Bug 147885 - [Meta] Beacon API support
Summary: [Meta] Beacon API support
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 175007 175069 175076 175192 175212 175264 175330 175386 175395 175401 175410 175443 175445 175723 175746 175839
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-11 11:07 PDT by Iraê
Modified: 2023-05-03 08:19 PDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iraê 2015-08-11 11:07:58 PDT
User metrics is a very common way of measuring a product success, be it a small startup or products like Yahoo Search, which I currently work on.
Most of the motivation for this new spec is expressed in the spec itself and other browser vendors are already onboard and have this Last Call Editor's draft spec on their stable version of the browser.

http://www.w3.org/TR/beacon/

I would like to illustrate our particular use case in order to help WebKit prioritize this request. In legacy Yahoo Search we track most of the events server-side, even before HTML is sent to the client. This is fine for the "legacy" web, almost without Javascript. The current iteration of Yahoo Search is a so called "Single Page App", and all the runtime and even navigation is handled by Javascript and updates to the page are using XHR to fetch data. Moving user metrics aggregation to the client has been a challenge and we do variations on the techniques described in the aforementioned spec.

In our particular case, we would appreciate the `navigator.sendBeacon` API not only for the reasons stated there, but also we are very found of the following paragraph:

> "The User Agent SHOULD transmit data at the earliest available opportunity, but
> MAY prioritize the transmission of data lower compared to other network
> traffic. The User Agent SHOULD make a best effort attempt to eventually transmit
> the data."

Specially in areas with low coverage of cellular data access, this would mean a lot perceived performance improvements for the end-user, as we could use the new API to send all user metrics data, not only the clicks that happened before unloading the document, and Safari could potentially hold this requests until user has higher bandwidth available. Our search results would potentially load faster, the website the user is navigating to would load faster.
Comment 1 Radar WebKit Bug Importer 2016-03-28 14:18:59 PDT
<rdar://problem/25396198>
Comment 2 Joseph Pecoraro 2017-09-28 22:19:34 PDT
Chris, all sub-bugs of this are complete, does anything remain here?

I did file this one:
<https://webkit.org/b/177579> Include "beacon" ResourceTiming entry
Comment 3 Anne van Kesteren 2023-05-03 08:19:00 PDT
This indeed appears to have been resolved quite a while ago. The Resource Timing issue can be tackled separately as it requires a standardization discussion.