Skip to content

Time to first byte: why your server's first response sets the pace for the whole page

Before a browser can download images or run scripts, it waits for the HTML. Server-side caching, a fast stack and a nearby server cut that wait.

IDX·October 19, 2026·2 min read

Time to first byte (TTFB) is the time between a browser requesting a page and receiving the first byte of the response. Everything else, styles, images, scripts, waits behind it. A slow TTFB makes every other optimisation less effective.

What makes up TTFB

  • Network distance and connection setup: DNS lookup, TCP and TLS handshakes.
  • Server processing: the application building the page, often with many database queries.
  • Server load: a busy server queues requests.

Server-side caching does the heavy lifting

Most pages do not need to be rebuilt for every visitor.

  • Full-page caching stores the finished HTML and serves it directly, skipping the application and database. For content sites it is the single biggest improvement.
  • Object caching keeps the results of expensive database queries in memory for dynamic pages that cannot be cached whole.
  • Opcode caching keeps compiled PHP in memory so code is not recompiled on every request.

Logged-in users, carts and checkouts must bypass full-page caching; a good caching layer handles this automatically.

Other improvements

  • A fast web server: LiteSpeed and nginx handle many concurrent connections efficiently.
  • A current PHP or runtime version: newer versions are usually faster.
  • An efficient database: indexes on slow queries, enough memory, fast storage.
  • HTTP/2 or HTTP/3 and TLS session resumption to reduce connection overhead.
  • A server near your users, and a CDN for static assets.

Measure before and after

Test from locations your users are in, several times, for both cached and uncached pages. Your browser's developer tools and public speed-testing tools show TTFB alongside the rest of the page load.

How IDX helps

IDX shared and web hosting run on LiteSpeed servers with NVMe storage. On VPS and dedicated servers, our managed services team can tune the web server, caching and database for your application.

IDX on digital infrastructure

Back to blog →

Ready to move to hosting that keeps up?

Start today with a free migration and a money-back guarantee.