TTFB
Time to first Byte
ChromeFirefoxSafari
Other Vital

Measures the duration from when a page starts loading to when the first byte of content is received from the server.

How TTFB is Calculated

  • Client sends a request: The client (e.g., a web browser) sends a request to the server for a specific resource, such as a webpage or an API endpoint.
  • Server processes the request: The server receives the request and starts processing it. This may involve executing server-side code, accessing databases, or performing other operations to generate the response.
  • Server prepares the response: Once the server has processed the request, it prepares the response by generating the necessary data and headers.
  • Server sends the response: Finally, the server sends the response back to the client over the network. The first byte of the response is the initial piece of data that the client receives.
  • Client measures TTFB: The client measures the time it takes to receive the first byte of the response. This duration is the TTFB.

It's important to note that TTFB includes not only the time spent on the server-side processing but also the time spent on network latency, data transmission, and any other factors that contribute to the delay in receiving the first byte.