by Daniel Sim
Time To First Byte (TTFB) is the time it takes for the Shopify server to start sending a webpage to a browser. Your browser asks the Shopify server 'give me this page', the Shopify server generates that page and then starts sending it.
By just measuring the Time To First Byte it gives us a good indication of just how long the server takes to generate the page. It doesn't distract us with things like larger pages taking longer to download over a slower connection.
Do you have slow TTFB on Shopify?
You should expect to see a TTFB of less than one second on Shopify. Anything above this we would consider slow.
There is a bit of a confounder with TTFB on Shopify because of how Shopify caches pages on the server so it doesn't have to generate them from scratch on every request.
We've explored this over at Can Shopify Liquid code slow down a shop?. I'd recommend you go and read that since it details how Shopify page caching works, its effect on TTFB and how to reliably measure TTFB.
Fixing slow TTFB on Shopify
The most likely solution is that you have some slow Liquid in your theme that should be rewritten to make it faster. If you haven't already, take a read through our slow Liquid article.
Another possibility is that you've set up your shop to have something else 'in front' of the Shopify servers. A common service which does this is Cloudflare. It will sit 'in front' of the Shopify servers and attempt to provide other features like reliability, anti-hacking and speed up.
If you suspect that's a possibility it is straightforward to disable Cloudflare, measure your TTFB and then measure it again with Cloudflare turned on.