Bug 147885 - [Meta] Beacon API support
Summary: [Meta] Beacon API support
Status: ASSIGNED
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: 175746 175007 175069 175076 175192 175212 175264 175330 175386 175395 175401 175410 175443 175445 175723
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-11 11:07 PDT by Iraê
Modified: 2017-08-18 17:01 PDT (History)
7 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>