andre487
andre487

Reputation: 1397

Is PerformanceTiming.responseStart points to HTML or headers start?

I have a question about PerformanceTiming.responseStart.

Is it a time to first byte of headers of a time to first byte of HTML? In some projects this times can be very different. E. g. when progressive page rendering is used.

Upvotes: 7

Views: 246

Answers (1)

CoderPi
CoderPi

Reputation: 13211

[...] must return the time immediately after the user agent receives the first byte of the response from the server

http://www.w3.org/TR/2012/REC-navigation-timing-20121217/#dom-performancetiming-responsestart

The Response is everything including the HTTP-Header, this is even before the HTML-Head. It's the moment when data is on the Networks Socket and beeing read for the first time.

Here is a neet little animation and explanation page about that: https://varvy.com/performance/responsestart.html

When a resource is retrieved via the network (rather than the application cache) responseStart represents part of the HTTP request / response timeline.

It this Point in Time in your Browsers Network-Tool F12:

enter image description here

Upvotes: 5

Related Questions