On this page
TTFB (Time to First Byte)
TTFB (Time to First Byte)
Time to First Byte (TTFB) measures the elapsed time from when a browser issues an HTTP request to when it receives the first byte of the response. It is a foundational web performance diagnostic that precedes every other user-experience metric — a high TTFB adds latency to Largest Contentful Paint (LCP), First Contentful Paint (FCP), and every resource that depends on the initial document.
What TTFB measures
TTFB is formally defined in the Navigation Timing Level 2 specification as responseStart − requestStart. It captures server processing time, network round-trip time, and queue/redirect overhead, but excludes DNS lookup and TCP connection setup (those fall under Time to Connect).
TTFB is not a Core Web Vitals|Core Web Vital — it is a diagnostic metric. Google states that "it is not absolutely necessary that sites meet the good TTFB threshold, provided that it doesn't impede their ability to score well on the metrics that matter." (web.dev/articles/ttfb)
Google thresholds (as-of 2025)
| Rating | TTFB | Measurement |
|---|---|---|
| Good | ≤ 800 ms | 75th percentile |
| Needs improvement | 801 – 1,800 ms | 75th percentile |
| Poor | > 1,800 ms | 75th percentile |
Source: web.dev/articles/ttfb
Practitioner targets differ. While 800 ms is the official floor for "not poor," practitioners and monitoring tools advise targeting under 200 ms for static or cached routes and under 200 ms from major regions as the competitive bar for ecommerce. (Webeyez, 2025)
Relationship to LCP
TTFB is the strongest single predictor of poor Largest Contentful Paint (LCP):
- Chrome User Experience Report (CrUX)|CrUX field data shows that for origins with poor LCP, the 75th-percentile TTFB averages 2,270 ms — nearly the entire 2,500 ms "good" LCP threshold. At that point, "it becomes statistically impossible for those sites to achieve good LCP without first fixing TTFB." (web.dev/articles/ttfb) (as-of 2025)
- Origins with good LCP have a median TTFB of approximately 600 ms per the same CrUX aggregate. (web.dev/articles/ttfb) (as-of 2025)
A server-rendered (SSR) site may have a higher TTFB than a client-side rendered (CSR) SPA, but can still achieve better FCP and LCP because the browser can render markup immediately on receipt — whereas the CSR app must download, parse, and execute JavaScript before any meaningful content appears. (web.dev/blog/common-misconceptions-lcp)
Global benchmarks (as-of 2025–2026)
- Only 44% of mobile pages globally achieve a "good" TTFB score (≤ 800 ms) as of 2025 — described by DebugBear as "the most stagnant performance metric on the web," nearly unchanged from 41% in 2021. (DebugBear, 2025) (as-of 2025)
- Ecommerce vertical median TTFB: approximately 650 ms — above the "good" threshold. (Auditite benchmark tool, date undisclosed; low confidence — methodology not independently verified) (as-of 2026)
- Desktop average TTFB across all websites: approximately 1,286 ms, above the "good" threshold. (compiled statistics, original measurement source unspecified, as cited in Queue-it 2026 roundup)
Measurement change: Early Hints and TTFB (February 2025)
In February 2025, Chrome changed how it measures TTFB for sites using HTTP/103 Early Hints. Previously Chrome reported responseStart as when the HTML document itself began arriving; Firefox and Safari already counted the earlier early-hints response bytes. Chrome aligned with the other browsers — TTFB now improves for any site that sends Early Hints before the full document is ready. (DebugBear, 2025)
Optimization techniques
The following techniques are documented by Google's Chrome team (web.dev/articles/optimize-ttfb, confirmed as of November 2025):
| Technique | Mechanism | Notes |
|---|---|---|
| Content Delivery Network (CDN) — full HTML caching | Serve cached HTML from edge nodes geographically close to the user | The most common mistake: caching only static assets (CSS/JS/images) while fetching HTML from the origin on every request |
| Eliminate redirect chains | Each redirect adds a full round-trip before the document begins | |
| Streaming markup (chunked transfer) | Send initial HTML bytes to the browser before the full page is generated server-side | Allows the browser to begin resource discovery and render earlier |
| Service worker + stale-while-revalidate | Return a cached response immediately; update cache in background | Near-instant TTFB on repeat visits |
| HTTP/103 Early Hints | Server sends preload/preconnect headers before full HTML is ready | Reduces effective perceived TTFB for dependent resources (fonts, CSS) |
| ISR / static rendering (Incremental Static Regeneration (ISR)) | Pre-generate HTML at build time or on-demand, serve from cache | Eliminates server-generation time for product pages with low update frequency |
| Speculation Rules API | Pre-render likely next pages during idle time | Pays TTFB cost in advance; Shopify deployed platform-wide June 2025 with meaningful improvement in load time |
Ecommerce-specific patterns
- ISR + edge caching is particularly effective for grocery ecommerce product listing pages, where inventory data can be handled via client-side hydration while the structural HTML is served statically. (1Digital Agency, 2026)
- Next.js SSR TTFB reflects: SSR render time + data-fetch latency + middleware execution + redirects + caching layer. Practitioners target under 200 ms for static/cached routes and treat 300 ms+ as requiring remediation. (Webeyez, 2025)
- Shopify's managed infrastructure produces slightly lower TTFB than the broader ecommerce average; however, fashion and home goods Shopify stores still average LCP of 3.7–4.3 seconds on mobile, attributed to third-party app overhead and imagery rather than TTFB. (1Digital Agency 2026 ecommerce benchmarks)
Ecommerce case: Shopify + Speculation Rules (June 2025)
Shopify deployed Speculation Rules API|speculation rules platform-wide in June 2025, effectively reducing perceived TTFB for likely next navigations. Yoav Weiss from Shopify implemented a working Safari prototype of speculation rules as part of this initiative. Shopify reported meaningful load time improvement across all percentiles. (DebugBear, 2025)
Key terms
| Term | Meaning |
|---|---|
| responseStart | Navigation Timing timestamp when the browser receives the first byte of the response |
| requestStart | Navigation Timing timestamp when the browser sends the HTTP request |
| TTFB | responseStart − requestStart |
| Early Hints (103) | HTTP 1xx informational response the server sends before the full document, containing preload/preconnect hints |
| ISR | Incremental Static Regeneration — a Next.js/edge rendering pattern combining static HTML generation with on-demand revalidation |
| Stale-while-revalidate | Cache directive: serve cached content immediately; refresh cache in background |
Contradictions
Google (web.dev) frames TTFB as a critical diagnostic that must be fixed for good LCP (web.dev/articles/ttfb), while Cloudflare has argued in a blog post titled "TTFB: Time To First Byte Considered Meaningless" (blog.cloudflare.com) that TTFB is a poor proxy for user experience because it doesn't capture rendering or JavaScript execution time, and optimizing TTFB can distract from more impactful metrics. Note: Cloudflare is a CDN vendor with commercial interest in TTFB being seen as important; Google is the originator of Core Web Vitals and has a broad interest in web performance measurement.