Back to glossary

Time to First Byte (TTFB)

The duration from the user's request to the first byte of the server response reaching the browser. TTFB measures server-side processing speed and network latency, directly impacting all subsequent loading metrics.

TTFB is the foundational performance metric because every subsequent metric depends on it. A slow TTFB delays LCP, FCP, and ultimately INP because the page cannot be interactive until content arrives. TTFB includes DNS lookup, TCP connection, TLS handshake, server processing time, and the network transit of the first response byte.

For engineering teams, TTFB optimization focuses on reducing server processing time and leveraging edge infrastructure. Key strategies include CDN deployment to reduce geographic latency, server-side caching to avoid redundant computation, database query optimization, HTTP/2 or HTTP/3 for connection efficiency, and early hints (103 status code) to allow browsers to preload resources while the server is still processing. For dynamic pages, consider stale-while-revalidate caching patterns that serve cached content immediately while refreshing in the background. Google considers TTFB of 800ms or less as good. For static sites and ISR pages, TTFB should be under 200ms from edge nodes.

Related Terms