Website Speed: Time to First Byte (TTFB)

Website Speed

When troubleshooting a slow website, there are a few helpful metrics to determine the causes and solutions. One of those metrics is the Time To First Byte (TTFB), a measurement used by all website performance benchmarking tools. It’s an important metric to measure how fast your website starts loading in a specific location or with a particular combination of settings. Understanding TTFB can help you better grasp how website speed works, what’s slowing down your website, and how to fix it.

What is Time To First Byte (TTFB)?

TTFB measures the time elapsed between the time a web user makes an HTTP request, like loading a web page, to when the client’s browser receives the first byte. Many use this reading as a rudimentary way to test server speed, and while this works, it’s only half the story. If the website you’re trying to load uses a Content Management System (CMS) like WordPress, the server must do all the CMS computations required to produce content. The PHP service must load your MySQL database, get the content, calculate the appropriate HTML output, and return it to the website visitor.

If you have a slow CMS, all those steps can take time, and you may receive lousy TTFB results like 1-3 seconds or more (a good online tool to check your TTFB performance is GTmetrix). That doesn’t necessarily mean your hosting server is slow or experiencing issues, but good chances are they are not using SSD storage or Litespeed. More often than not, it means you have too many plugins or extensions, you’re not using a caching system, or you’re using an old PHP version. Of course, it is a different story if you are measuring a static HTML page with a slow TTFB. Then, you may want to start your investigation from the server itself, as no other factors impact your website’s performance.

How Does Dynamic Caching Affect TTFB?

Dynamic Caching is like having your local barista remember your order instead of having to repeat it every time. Because they already know your drink, they can start making it as soon as you walk in, serving it to you that much faster. Caching works in a similar way by storing the data required to serve a webpage for next time.

Our Dynamic Caching uses NGINX as a reverse proxy. That means that all the computing from your PHP and MySQL services are stored in the server’s RAM. When a visitor gets a cached response from us, it’s like they’re loading a static HTML page — only faster! It’s faster because the content is served from memory and not from the server’s hard drive. Although SSDs are super fast, nothing compares to the server RAM when it comes to speed.

If you have the Dynamic Caching on and still have slow Time to First B, there are two things to check:

  • Are you measuring a cached result? The easiest way to check is to perform your test more than once. It is normal to get a slower first result and much faster consecutive ones. By performing multiple tests you can guarantee you’re measuring cached results.
  • Are you measuring from a close geographical location? If you’re testing from a remote location, it is normal that you have high networking latency. If you want your website to be fast from a variety of locations, consider implementing a CDN.

Can All Pages be Cached?

Not all pages can be fully cached. Checkout pages, carts, and logged-in users have exceptional circumstances. That doesn’t mean the TTFB has to be slow. The first step is making sure you’re using PHP 7.1 or above. We have opcache enabled by default for it, and WordPress and other CMS apps work dramatically faster. Next, you can use our Memcached service to improve your app’s time to get data from the MySQL server. Last but not least, check the plugins you’re using. How many are you using, are they high-quality, and what load do they cause to your page rendering process?

Caching tends to camouflage poorly built websites by masking development problems. If your website loads quickly without cache, this means it has good code and is “healthy”. It would help if you didn’t rely solely on our Dynamic Caching or your own caching plugins to have a fast website.

How Does a Content Delivery Network (CDN) Affect performance?

As mentioned above, TTFB is seriously affected by the networking speed between the server and your browser (or the tool you’re using to test your speed). Using a CDN can improve your website speed if it has endpoints near your geographic location. Note, however, that if you have a CDN like Cloudflare or QUIC enabled, you’re measuring the TTFB between your browser and the particular CDN endpoint serving your request and not between you and the neoxea server. If the CDN hasn’t cached your content yet, it has to call the neoxea server first, get the data, distribute it and then serve it to you. That may cause further delay before the first byte is received.

To get around this, make sure you have caching enabled for your CDN and check whether it has an endpoint close to your geographic target. It’s worth experimenting with different CDN providers if your visitors are in a part of the world that your current one does not cover.


Save time and money, plus make your website go faster with our next-generation cloud platform available in every Managed WordPress plan. This includes a high-performance web server, DDoS protection, malware and email spam mitigation, a free cache plugin, and Linode’s fastest AMD CPU machines. Get started with no long-term contracts, free migrations, and a 45-day money-back guarantee.
Check out our plans or talk to sales to find the right plan for you.