navigation-timing icon indicating copy to clipboard operation
navigation-timing copied to clipboard

Clarify how PerformanceTiming.responseStart relates to Early Hint responses

Open colinbendell opened this issue 3 years ago • 5 comments

Should responseStart measure the time to first by for any response or only measure non-informational HTTP responses (specifically focused on HTTP status code >= 200)?

Currently the spec is ambiguous referring to "first byte of the response" which could be interpreted to include HTTP 103 Early Hints and other informational responses.

responseStart - the time immediately after the user agent receives the first byte of the response from the server

The responseStart is widely used to measure TTFB from the user's perspective. Measuring to the start of an Early Hint response can pollute this colloquial interpretation of this measurement. I would propose that responseStart should ignore informational responses (HTTP Header frames with a 1xx response code) and only relate to the first byte of an authoritative content response (HTTP >= 200)

colinbendell avatar Aug 31 '22 16:08 colinbendell

related: https://github.com/w3c/resource-timing/issues/345

LPardue avatar Aug 31 '22 16:08 LPardue

Discussed on 9/1 W3C WebPerf Call: https://github.com/w3c/resource-timing/issues/345#issuecomment-1234602117

nicjansma avatar Sep 01 '22 17:09 nicjansma

This is probably blocked on w3c/resource-timing#345.

clelland avatar Sep 26 '22 14:09 clelland

TTFB is a broken metric at this point Screenshot 2023-02-24 at 10 00 13 AM

adardesign avatar Feb 27 '23 19:02 adardesign

See https://github.com/w3c/resource-timing/issues/345#issuecomment-1519528006

noamr avatar Apr 24 '23 07:04 noamr