TTFB (Time to First Byte) is the time between the browser starting a navigation request and receiving the first byte of the response. It includes redirects, DNS lookup, TCP connection, TLS handshake, the request travelling to the server, the server's processing time, and the first byte travelling back.
Why it matters
Nothing can render until the first byte arrives, so a slow TTFB delays every other loading metric, including Largest Contentful Paint. Google's web.dev guidance treats a TTFB of 0.8 seconds or less as good and more than 1.8 seconds as poor, measured at the 75th percentile of real visits. TTFB is also a handy way to separate a slow server from a heavy page: if the first byte is late, the problem is upstream of the HTML.
Example
$ curl -o /dev/null -s -w 'dns:%{time_namelookup} connect:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer}\n' https://example.com/
dns:0.012 connect:0.031 tls:0.075 ttfb:0.412
Here the network handshake finishes at 75 ms, so roughly 337 ms of the 412 ms is the server generating the response.
Common mistakes
- Testing from a single location next to the server. Test from where your visitors are.
- Measuring only the cached homepage. Uncached, logged-in and search pages are usually much slower.
- Blaming the network when the cause is slow database queries or a cold application cache.
- Ignoring redirect chains, which add a full TTFB for each hop.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.