W3C home > Mailing lists > Public > public-web-perf@w3.org > August 2015

W3C Resource Timing API: Easy access to timing information for a particular XmlHttpRequest

From: Red Daly <reddaly@google.com>
Date: Thu, 30 Jul 2015 16:32:30 -0700
Message-ID: <CAA_4_EXQsgc6B+dMYu-gqsH+i7q7khjRCz5EUcMoDRiMm_n9QQ@mail.gmail.com>
To: public-web-perf@w3.org
Cc: Vincent Chen <vchen@google.com>
I don't believe the Resource Timing API
<http://www.w3.org/TR/resource-timing/> includes a 100% clean method for
getting the timing information corresponding to an XmlHttpRequest object.
If this is the case, it might help users to include a simple lookup as part
of the API.

My use case:
I'd like to get request timing information for a particular XmlHttpRequest
so I can set timeouts for various stages of the request.  For example, I
don't want my network timeout budget to include time spent waiting for
other, unrelated connections to finish.

It seems I can use the URL being requested with
window.performance.getEntriesByName.  However, if there are multiple
requests to the same URL, I don't know of a 100% reliable way of matching
my XmlHttpRequest object up with the returned entries.  Perhaps it's
possible by using the workerStart timestamp, but if so that seems clumsy.

Received on Wednesday, 5 August 2015 21:40:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 August 2015 21:40:29 UTC