What does time to first byte measure?

  • Time to first byte is the wait from the start of navigation until the first response byte arrives. In a browser, that can include redirects, DNS lookup and connection setup as well as server work.

  • Some servers send 103 Early Hints or flush their headers before the page is ready, and those count as the first byte. That makes TTFB hard to compare across platforms, so check what your tool measures before comparing numbers, as the TTFB guide advises.

How to reduce initial server response time

  • Add a Server-Timing header to see whether database queries or page rendering take the time. For public pages that can be reused, a CDN cache can answer closer to visitors without generating the page again. Google's TTFB guide explains both approaches.

  • If your pages run on AWS Lambda, a cold start adds setup time before your code handles the request. Lambda's execution lifecycle explains how Provisioned Concurrency and lighter initialization code reduce it.

Frequently asked questions

What's a good time to first byte?

Google gives 0.8 seconds or less as a rough guide for most sites. It's a starting point for investigation, not a complete measure of the page's loading experience.