Time to first byte (TTFB)
Time to first byte (TTFB) is the time from the start of a navigation until the first byte of the response arrives in the browser. It includes redirects, service worker startup, the DNS lookup, connection and TLS set-up, and the request itself. web.dev counts 0.8 seconds or less as good and more than 1.8 seconds as poor.
The longer version
web.dev, in the article by Barry Pollard and Jeremy Wagner last updated on 18 November 2025, defines TTFB as the sum of five phases: redirect time, service worker startup time where there is one, DNS lookup, connection and TLS negotiation, and the request up to the arrival of the first byte of the response. In Navigation Timing terms it is the time between startTime and responseStart. MDN's glossary entry describes the same span, naming the DNS lookup and the TCP and TLS handshakes. Older definitions treat TTFB as a measure of server responsiveness alone, and the browser metric is broader: a slow database query, a server on another continent, a chain of redirects and a service worker that has to start all land in the same number. One detail changes what first byte means. A server that sends a 103 Early Hints response, or flushes its headers early, has its first byte counted at that interim response. Chrome moved responseStart to the final response in version 115 and reverted the change in version 133, and finalResponseHeadersStart now measures the final response separately, so TTFB figures from different platforms are only comparable when both measure the same moment.
web.dev's thresholds are good at 0.8 seconds or less, poor at more than 1.8 seconds, and needs improvement in between. web.dev ties the figure to first contentful paint: the server should answer navigation requests quickly enough that the 75th percentile of users see FCP within its good threshold, and web.dev calls 0.8 seconds a rough guide. TTFB is not a Core Web Vital. web.dev lists the Core Web Vitals as largest contentful paint, interaction to next paint and cumulative layout shift, and describes TTFB and FCP as supplemental metrics that help diagnose a slow LCP. Its key point is that a site does not have to meet the good TTFB threshold, provided TTFB does not stop it scoring well on the metrics that matter. A client-rendered single page application needs a low TTFB because nothing useful appears until its scripts arrive, while a server-rendered page can carry a higher TTFB and still paint sooner. Testing tools grade on scales of their own, which are the vendor's and not web.dev's.
In the field, TTFB comes from the Chrome User Experience Report, shown in PageSpeed Insights for public sites, from the web-vitals library's onTTFB function, or from any real user monitoring script that reads performance.getEntriesByType("navigation")[0].responseStart. In the lab it comes from the Chrome DevTools Network panel, WebPageTest or the document request latency insight in PageSpeed Insights. Lab and field values drift apart for known reasons. Lab tools usually request the final URL and so skip the redirects a real visitor followed, which is why web.dev treats field data as the primary source. A page served from a CDN cache hides a slow backend, so testing an uncached URL shows what the first visitor waits for. The DevTools Timing tab's Waiting (TTFB) row covers only the wait for that request's first byte, after the connection is set up, and web.dev notes that the Lighthouse server response time audit excludes DNS lookup and redirect times. Each reads lower than the metric.
The common causes are hosting that cannot carry the traffic, slow database queries and server-side rendering, users far from an origin with no CDN, cache misses, redirect chains such as http to https or a missing trailing slash, and query parameters added for analytics that make a cached page look new to the CDN. web.dev's guide to optimising TTFB works through them: adequate hosting first, a CDN with Cache-Control headers set so pages can be served from the edge, removing same-origin redirects and using HSTS to skip the http hop, streaming HTML or rendering it statically at build time, a service worker with a stale-while-revalidate strategy where the document allows it, and 103 Early Hints so the browser can fetch critical CSS while the server works. A Server-Timing response header splits the backend time into named parts, such as the database and the render, and shows them in DevTools and in Navigation Timing. A report that a page is slow is easier to act on when it says whether it was a first visit, from where, and with which URL, because each of those changes the TTFB.
Common questions
What is a good time to first byte?
A good TTFB is 0.8 seconds or less, according to web.dev, and more than 1.8 seconds is poor, with the range between counted as needs improvement. web.dev calls the figure a rough guide: what matters is that the server answers quickly enough for first contentful paint to land within its own good threshold for most visits.
What does time to first byte measure?
TTFB measures everything between the start of a navigation and the arrival of the first byte of the response: redirects, service worker startup, the DNS lookup, the connection and TLS set-up, and the time the server takes to begin answering. A high value can come from the network and the redirects as much as from the server.
How do I check TTFB in Chrome?
Open DevTools, select the document request in the Network panel and read the Timing tab, where the Waiting (TTFB) row shows the wait for the first byte after the connection was made. For the full metric, run performance.getEntriesByType("navigation")[0].responseStart in the console, which also counts redirects, DNS and connection time.
Why is my TTFB so high?
Slow server work is the usual answer: database queries, server-side rendering or an underpowered host. Distance and redirects are the other two. A visitor far from the origin with no CDN pays a long round trip, and every redirect adds a full request before the real one starts. A Server-Timing header and a test from the visitor's region show which applies.
How do you improve time to first byte?
Serve from a CDN and let pages be cached at the edge, remove redirects you control, use HSTS to skip the http hop, speed up database queries and rendering, stream or statically render HTML, and send 103 Early Hints for critical resources. web.dev puts hosting first: a host that cannot carry the traffic limits everything else.
Is TTFB a Core Web Vital?
TTFB is not a Core Web Vital. web.dev lists the Core Web Vitals as largest contentful paint, interaction to next paint and cumulative layout shift, and treats TTFB as a supplemental metric for diagnosing slow loading. A high TTFB still matters because it delays first contentful paint and largest contentful paint, which come after it.
What is the difference between TTFB and first contentful paint?
TTFB ends when the first byte of the response arrives. First contentful paint ends when the browser first renders text or an image, so it includes TTFB plus the time to fetch render-blocking CSS and scripts and to paint. A page can have a fast TTFB and a slow FCP when the browser waits on stylesheets or fonts.
Bug reports that arrive ready to triage.
Collect replay, console, network and browser context with the Free plan.