Performance

TTFB vs LCP: How Server Speed Affects Page Experience

TTFB ends when the first response bytes arrive. LCP ends when the main visible content renders. A fast server is helpful, but it cannot compensate for a late-discovered hero image or a blocked main thread.

4 min read880 words

Key takeaways

  • TTFB is an upstream component of LCP, not a substitute for it.
  • Break LCP into server response, resource discovery, transfer, and render delay.
  • Diagnose with navigation timing, waterfalls, server traces, and field data together.
  • A fast first byte is useful evidence, but it never proves that the largest visible content arrived quickly.

What TTFB and LCP measure

Time to First Byte measures from navigation start until the browser receives the first byte of the main document. It includes redirects, connection setup, network travel, CDN or proxy work, and origin processing. It is a diagnostic metric for the response path.

Largest Contentful Paint measures when the largest eligible image or text block in the viewport renders. It includes everything before that moment, including TTFB. LCP is a Core Web Vital because it approximates when the page feels useful to the visitor.

MetricStops whenUse it to diagnose
TTFBFirst HTML byte arrivesRedirect, network, edge, and origin delay
LCPLargest visible content rendersEnd-to-end main-content experience
TTLBLast response byte arrivesFull document or resource transfer

How TTFB contributes to LCP

The browser cannot discover an image URL in HTML it has not received. Every extra millisecond before the document arrives reduces the time available to meet the LCP target. As a rough performance guide, many sites aim for TTFB of 0.8 seconds or less, but the right diagnosis depends on geography, cache status, connection, and application needs.

A low TTFB does not guarantee a good LCP. The page can spend seconds waiting to discover the hero resource, download a large image, load a web font, execute JavaScript, or remove a loading overlay. Conversely, an LCP problem with a dominant TTFB component should be fixed at the delivery and origin layers.

Diagnose slow TTFB from the outside inward

Inspect redirect timing, DNS, connection and TLS setup, request start, and response start. Compare cache hits with misses and test from user regions. Then trace origin work: middleware, authentication, server rendering, database queries, downstream APIs, and queue waits.

Cache public responses at the edge, prerender stable pages, remove redirect hops, place delivery near users, reuse connections, and index or eliminate slow database work. Do not hide a slow personalized origin behind a cache rule that could leak private content.

Diagnose the complete LCP breakdown

Identify the LCP element and divide its time into TTFB, resource load delay, resource load duration, and element render delay. If the element is text, focus on font and rendering behavior. If it is an image, inspect discovery, priority, dimensions, format, and bytes.

Make critical resources visible to the preload scanner in initial HTML. Do not lazy-load the likely LCP image. Reduce main-thread work and avoid hiding content until hydration. An optimization matters only if it shortens the final LCP, not if the saved time reappears as another delay.

Account for field variance and cache state

A local test near the origin may show excellent TTFB while users on another continent experience extra round trips. Returning visitors may have cached fonts and images that first-time visitors lack. Signed-in users may take an uncached application path.

Segment field metrics by template, geography, device, navigation type, and application state where privacy allows. Use percentiles rather than averages so the slow user journey remains visible.

Trace the gap between TTFB and LCP

The interval between TTFB and LCP is a compact diagnostic signal. If TTFB is slow, investigate CDN misses, origin queueing, application work, and database calls. If TTFB is healthy but LCP is slow, focus on render-blocking resources, discovery of the LCP asset, image transfer, client rendering, and main-thread work. If both regress together, a release may have changed several layers or delayed the HTML that discovers critical assets.

Build one waterfall for a cached navigation and one for an uncached navigation. Mark the request that produced the LCP element, when the browser discovered it, and which resources blocked rendering. Then place the server-side segment on a high-availability AWS web architecture so CloudFront, load balancing, compute, and data timing have explicit owners.

Validate the hypothesis with a controlled change. Preload only when discovery is the bottleneck, resize only when transfer is the bottleneck, and cache HTML only when freshness and personalization allow it. Re-run the Core Web Vitals workflow in field data because a laboratory improvement can disappear on slower devices or different network paths.

  • Track server response, resource discovery, resource load, and render delay separately.
  • Compare cache-hit and cache-miss waterfalls.
  • Confirm the LCP element is stable across viewport sizes.
  • Use a release marker to prove when the regression began.

Common questions

Frequently asked questions

Is TTFB a Core Web Vital?

No. TTFB is a diagnostic web performance metric. It is important because it happens before meaningful rendering and contributes directly to LCP.

Can a CDN improve TTFB?

Yes, especially when it serves a cached response closer to the user or optimizes the connection path. Cache misses and uncacheable origin work can still produce high TTFB.

Why is LCP slow when TTFB is fast?

The LCP resource may be discovered late, downloaded slowly, assigned low priority, or delayed by fonts, CSS, JavaScript, hydration, or main-thread rendering work.

Go deeper

Tools and related resources

Continue the topic