[JSPreflight] An alternate approach


Since the JSPreflight spec was announced, there has been some very good,
and heated, debate about its merits.  While I think the idea's heart is in
the right place, I agree with many of Ilya Gregorik's concerns about it -
in particular those regarding security and the effect it may have on

>From what I've gathered from the spec and subsequent discussion, it seems
there's a desire to collect analytics data without needing to modify the
page's HTML.  With that in mind, I'd like to point out a proposal[1] that
I had drafted during the HTTP 2.0 discussions a year or so ago, as an
alternative or perhaps a complement to the JSPreflight spec.

While it can be refined more for this audience, the crux of idea is that:

- A server and user agent negotiate a set of measurements to collect
- The UA collects the measurements, and sends them back to the server

The semantics of how this is done can and probably should be changed from
their current state.  In particular, the proposal below uses HTTP headers
for much of the heavy lifting, whereas we might be able to refine it to
just have the UA send back the whole Performance Timeline[2], and/or
leverage the Beacon API[3] to send back data.



1. http://tools.ietf.org/html/draft-mccall-httpbis-timing-measurements-00
2. http://www.w3.org/TR/performance-timeline/
3. https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html

Received on Monday, 9 September 2013 13:45:47 UTC