2 min read

Time to First Byte (TTFB)

Measures how long it takes for a server to begin responding after a page request.

Time to First Byte, or TTFB, measures how long it takes for a server to start responding after a browser requests a page.

TTFB focuses on backend performance. It asks a practical question: how quickly does the system begin delivering anything at all?

A good TTFB is under 800 milliseconds. Above ~1800 milliseconds is considered slow – imagine seeing a white page for nearly 2 seconds!

What TTFB Measures

TTFB measures the time between:

  1. The browser requesting a page, and
  2. The first (literal) byte of the server’s response arriving

This doesn't measure how long the page takes to load, but how quickly the response begins.

If TTFB is slow, users often see a blank page before anything renders.

What Happens During TTFB

Several steps happen before the first byte is returned to the browser:

  • DNS lookup
    The browser finds the server’s IP address.
  • Connection setup (TCP + TLS)
    The browser establishes a connection and, if needed, sets up a secure HTTPS session.
  • Request sent to the server
    The browser asks for the page or resource.
  • Server processing time
    The server prepares the response. This can include running code, querying databases, or assembling content.
  • First byte returned
    The server begins sending data back to the browser.

TTFB includes both network latency (distance and connection time) and server response time (how long the system takes to process the request).

Where TTFB Shows Up

TTFB can be measured in tools such as:

  • PageSpeed Insights
  • WebPageTest
  • GTmetrix
  • Browser developer tools (network tab)

Why TTFB Matters

TTFB is a signal of system responsiveness. This measurement offers a peek into the system's health.

If TTFB is fast, the page can begin loading quickly. If TTFB is slow, everything else is delayed — no matter how optimized the frontend is!

This matters because TTFB sets the starting point for other performance metrics. For example:

  • A slow TTFB often leads to a slow Largest Contentful Paint (LCP)
  • A fast frontend cannot compensate for a slow response

So, for SEO, TTFB matters because it reflects overall system health. For users, it matters because it affects how quickly the page starts to appear at all.

Common Causes of Poor TTFB

The problem: a poor TTFB usually indicates delays before the server can respond.

Common causes can include:

  • Slow hosting or infrastructure
    The server itself takes too long to respond (which usually means poor hosting).
  • Heavy backend processing
    Complex logic, API calls, or database queries delay the response.
  • Lack of caching
    The server rebuilds content on every request instead of serving a cached version.
  • Network latency
    The server is physically far from the user, increasing connection time.
  • Redirect chains
    Multiple redirects delay the final request.

How to Improve TTFB

Improving TTFB usually means reducing the time the system takes to start responding.

Common approaches include:

  • Using a Content Delivery Network (CDN) to serve content closer to users
  • Implementing server-side caching to avoid repeated processing
  • Optimizing database queries and backend logic
  • Reducing unnecessary redirects
  • Choosing reliable hosting or infrastructure
  • Precomputing or statically generating content where possible

Learn more about TTFB at web.dev