Skip to main content
Glossary

What is time to first byte (TTFB)?

Time to First Byte (TTFB) measures the delay from navigation start to the first response byte. It includes connection setup and server work. A slow document response can delay FCP and LCP.

TTFB is a diagnostic metric. It is not one of the Core Web Vitals.

Thresholds

Field TTFBRating
≤ 800msGood
> 800ms and ≤ 1800msNeeds improvement
> 1800msPoor

Use these Google guidelines at the 75th percentile of field measurements. They guide diagnosis, rather than decide the Core Web Vitals assessment.

Lighthouse's Document request latency insight flags server responses above 600ms. It also checks redirects and compression. That server response measurement excludes DNS and redirects, so it covers only part of navigation TTFB. TTFB does not directly contribute to the Lighthouse Performance score.

What TTFB includes

  • Redirect time
  • Service worker startup, when applicable
  • DNS lookup
  • TCP connection
  • TLS negotiation
  • Server processing time

TTFB does not include downloading the full response body. With 103 Early Hints, the first response byte can arrive before the final document response.

Measure TTFB

Use the TTFB Checker to compare available CrUX field data with a lab server-response measurement. The lab measurement excludes connection setup and redirects. Select the URL or origin scope and device. Missing URL data does not establish fast response times.

For one browser request, open DevTools Network, select the document, then open Timing. Waiting (TTFB) includes a network round trip and server processing. Inspect DNS, connection setup and redirects separately.

For a repeatable command-line request:

curl --silent --show-error --output /dev/null \
  --write-out 'first byte: %{time_starttransfer}s\ntotal: %{time_total}s\n' \
  https://example.com/

time_starttransfer reports seconds until the first response byte. This command measures one request from your machine. It does not follow redirects or measure a field percentile.

Improve the slow phase

If you findCheck next
Redirect delaysLink directly to the final URL
Slow connection setupDNS, connection reuse, and distance to the server
Long server processingDatabase queries, rendering work, and cold starts
Slow uncached responsesCache eligibility and cache misses

Google's TTFB optimization guide explains these checks. Compare the same URL and test conditions after a change. If TTFB improves but LCP stays slow, inspect resource loading and render delay.

Did this page help you?
Anything that could be done better? :)
Help us improve this page. You can edit this page on GitHub or provide anonymous feedback below.