time to first byte
The time from starting a request until the first byte of the server's response arrives, covering connection setup, server work and travel time.
In more detail
TTFB includes DNS, TCP and TLS setup plus the time the backend spends producing the response. It is measured to the first byte, not the whole download, so a large page can have a fast TTFB and still finish slowly. A slow TTFB delays every later step, including Largest Contentful Paint.
Related terms
- 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.
- latency — The time between asking for something and getting the answer back.
- backend — The server-side part of a web application that stores data and produces responses, as opposed to the frontend that runs in the browser.
- Largest Contentful Paint — A Core Web Vital: the time from starting to load a page until its largest visible image or text block is drawn.
Taught in
- How Browsers Work: Navigation, DNS, TCP, TLS And Request Timing — Frontend Architecture & Web Platform
- The Fetch API: Streaming Responses, HTTP Caching And Keepalive — Frontend Architecture & Web Platform