The Mijingo Blog

Latest news, updates, free tutorials, and more from Mijingo.

Web Performance Testing: Finding TTFB

by Ryan Irelan

When we do web performance testing, one of the performance metrics that we’ll want to test is Time to First Byte (TTFB).

Before I jump in to how to measure TTFB (via the video below–wait don’t skip!), let’s review what TTFB is and how it fits into the bigger picture.

Firstly, is not a sole actor. It is only one of the four network metrics that can impact page load time.

There are also:

  • DNS lookup time
  • Connection time
  • Download time

We’ll cover the rest another time, but for now let’s focus on TTFB.

What is TTFB?

Time to First Byte, TTFB for short, is the amount of time it takes for the browser to receive the first byte of data from the server after the browser makes the request.

TTFB does not include DNS lookup or any SSL negotiation that has to take place before there is a connection to make the request to the server. You can see this demonstrated in the video below where I show how to find out your TTFB using both Google Chrome and the Webpagetest.org.

Let’s roll the video:


Why is TTFB important to measure?

TTFB is important to measure is because it can create the perception that your page load is slow.

A fast TTFB will not help us if we have other performance problems with our webpage (e.g. if our page weight is too heavy or its assets not optimized).

Even if we have a snappy page in terms of other non-network metrics, a slow TTFB can give the perception of a slow page speed.

You can do all the work you want on improving other metrics for your webpage performance, however, if the TTFB is unacceptably slow, then your page speed will be perceived as slow by the end-user.

Filed Under: Web Performance Testing, Performance Budget, Performance Testing