W3C home > Mailing lists > Public > public-web-perf@w3.org > March 2013

[Beacon] Beacon API Specification

From: Jatinder Mann <jmann@microsoft.com>
Date: Wed, 6 Mar 2013 16:43:36 +0000
To: "'public-web-perf@w3.org'" <public-web-perf@w3.org>
CC: "Reitbauer, Alois (Alois.Reitbauer@compuware.com)" <Alois.Reitbauer@compuware.com>
Message-ID: <7ba9e269b07245348ad85d87b7cf1aa0@BLUPR03MB065.namprd03.prod.outlook.com>
A few weeks earlier, Alois and I had reached out to other working groups describing the poor performance patterns used to send data during the beforeunload and unload handlers. To avoid overloading existing methods, which may cause confusion and hurt adoption for our use case, we had agreed on sharing a more concrete Beacon API proposal [1].

We have put together a proposal for the Beacon API in this specification: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html. Please review this specification and provide feedback.

Initially, we were considering whether to create a XHR variant or a separate Beacon API. However, considering some of our requirements differ significantly from the existing XHR, it appears that having a completely separate Beacon concept from XHR may be less confusing for developers. Similarly, it feels like Ping attempts to solve a somewhat different problem and I worry that overloading it too will cause confusion and hurt adoption.

One of the goals of this API is that developers use it as a reliable means of transmitting data without needing confirmation whether the data has successful been sent, as the user agent now takes that responsibility. However, this version of the proposal does not attempt to make a guarantee that the data will be sent, just a best effort. For example, we don’t plan on attempting to send the data again if it failed the first time or plan on persisting the data locally to send later if the browser has been shut down. If there is a demand for those scenarios, we can consider them further.

Thanks,
Jatinder

[1] http://lists.w3.org/Archives/Public/public-web-perf/2013Feb/0038.html

Received on Wednesday, 6 March 2013 16:45:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:34 UTC