Time to First Byte
TTFB measures everything before the first byte of HTML arrives — DNS, TLS, and the server's own thinking. Why it caps every other metric.
What it is
Time to First Byte is the interval between the browser asking for a page and the first byte of the response arriving. It covers DNS resolution, the TCP and TLS handshakes, and whatever the server did before it started answering — database queries, template rendering, an upstream API call.
It measures nothing about rendering. A page can have an excellent TTFB and still paint slowly, and a page cannot paint quickly with a bad one.
Why it matters
Every other loading metric starts counting from this one. First Contentful Paint and Largest Contentful Paint are both bounded below by TTFB — a second spent before any HTML exists is a second no amount of front-end work can recover.
It is also the metric most likely to be invisible to the people who built the site. A developer on a fast connection near the origin sees a fraction of what a visitor two continents away experiences, and TTFB is the part of the budget that distance and cold serverless starts consume.
How to fix it
with a reference doc1. Cache the rendered response (a CDN edge cache, or a full-page cache at the origin)
2. Cache the expensive query behind it
3. Move the origin closer to visitors, or put a CDN in front of it
4. Check for a cold start: serverless platforms pay it on the first request after idle# serve a cached response and refresh it in the background
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pages:10m;
location / {
proxy_cache pages;
proxy_cache_valid 200 10m;
proxy_cache_background_update on;
}Related checks
4This is one of the 75 checks the scanner runs. See what we check for the full list, every severity weight, and how the score is computed from them.