WebPagetest Forums
Anything that is close to fetchStart in resource timing API? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Anything that is close to fetchStart in resource timing API? (/showthread.php?tid=13094)



Anything that is close to fetchStart in resource timing API? - trak729 - 07-16-2014 10:11 AM

Resource Timing API defines this:

"If there are no HTTP redirects or equivalent, this attribute must return the time immediately before the user agent starts to fetch the resource."

What could be a corresponding field in the WPT HAR file? This event definitely happens before the dns lookup starts. But, the lowest start value in WPT for a given resource is _all_start which, I think, cannot be less than _dns_start and so I am not sure if WPT provides this metric at all.


RE: Anything that is close to fetchStart in resource timing API? - andydavies - 07-21-2014 03:48 AM

The resource timing definition is defining fetchStart as when the UA actually puts the request on the wire so my view it's the earliest of _dns_start, _connect_start, and _ttfb_start in WPT terms.

If you want to verify you can use a WPT custom metric to dump the resource timing entries into a JSON string:

Code:
[resource-timing]
return JSON.stringify(window.performance.getEntriesByType("resource"));