Navigation Timing API

The part of the Performance API that records a timestamp for each step of loading the current page, from DNS lookup to the document being ready.

In more detail

Reading performance.getEntriesByType('navigation') returns an object with fields such as domainLookupStart, connectStart, connectEnd, requestStart and responseStart. Subtracting pairs gives the time spent on DNS, TCP and TLS, and responseStart minus requestStart approximates the wait for the first byte. domInteractive marks when the HTML parser finished.

Example

const [nav] = performance.getEntriesByType('navigation'); nav.responseStart - nav.requestStart

Related terms

Taught in

References