justseo academy·STAGE 2 · Technical eligibilityAll chapters →
    Chapter P5

    Delivery: Caching, Compression, Protocols, Servers

    17 min readPlaybookChapter 32 of 48Updated 2026

    The metrics tell you a page is slow. Delivery is where you make it fast. Four levers do most of the work: cache what you can, compress what you send, use a modern protocol to send it, and keep the server itself quick. Get these right and TTFB drops for every visitor at once.

    Caching

    Caching stores a copy of a resource so a later request skips regenerating or refetching it. It happens in layers: the browser, the CDN or edge, a reverse proxy, and the application itself. The principle underneath all of them is blunt: the fastest request is the one you never make. Caching cuts TTFB and repeat downloads, which pulls largest paint in with it. Caching cuts TTFB →

    The controls live in headers. Use Cache-Control to set policy. Static fingerprinted assets, whose filename changes when the content changes, can be cached hard with public, max-age=31536000, immutable, since a new build produces a new URL. Fresh HTML should not be frozen like that: use no-cache or a short max-age paired with stale-while-revalidate so a stale copy serves instantly while a fresh one fetches in the background. For per-user data, keep it private. Revalidation uses ETag or Last-Modified: the browser asks if its copy is still good and the server answers with a 304 and no body when nothing changed. Add Vary when the response depends on a request header so caches do not serve the wrong variant.

    Compression

    Compression shrinks text such as HTML, CSS, JavaScript, SVG, and JSON before it crosses the wire. The browser advertises what it accepts and the server picks a format. gzip is the universal safe floor that everything understands. Brotli, sent as br, is often smaller on text, so use its highest level for static build assets and a lighter level for content generated per request. Zstandard, sent as zstd, is newer and fast with support that is still expanding, so keep a Brotli or gzip fallback rather than serving it alone.

    One rule saves you from wasted effort and CPU: do not re-compress formats that are already compressed. JPEG, PNG, WebP, AVIF, MP4, and woff2 fonts are packed already, and running them through gzip or Brotli spends time to make them slightly larger. Compress text, leave media alone.

    Compress text and skip already-compressed media. gzip is the floor, Brotli usually wins on text, and zstd is coming but still needs a fallback.

    Protocols

    The protocol decides how many things you can send at once. HTTP/1.1 allowed one in-flight request per connection, a head-of-line block that forced browsers to open several connections and pushed developers into bundling hacks. HTTP/2 multiplexes many requests over a single connection and adds header compression, which removes most of that pain. Its remaining weakness is at the transport layer: because it rides on TCP, one lost packet stalls every stream on the connection.

    HTTP/3 runs over QUIC, which is built on UDP. A lost packet stalls only its own stream, and the handshake folds transport and TLS together so the connection sets up in one round trip. Enable HTTP/2 at minimum, and enable HTTP/3 where your CDN or server supports it, since the biggest win shows up on mobile and lossy networks. Verify what you are actually serving in the Protocol column of the DevTools Network panel, which reads h2, h3, or http/1.1. 503, Retry-After, and redirect chains →

    Server basics

    Aim for TTFB under 800 ms in the field and server processing under roughly 200 ms. The levers stack with everything above: put a CDN in front with edge caching, cache full pages and fragments, keep the backend efficient, use a modern transport, and remove redirect chains that add a whole round trip before the real response. Server capacity equals crawl capacity →

    Two tools help you see inside the server's time. A Server-Timing header lets the backend report how long each internal phase took, such as the database query versus the application code, so you profile the black box instead of guessing. Early Hints, sent as an 103 response, let the server tell the browser to start preloading critical assets during the think-time before the full response is ready. Once delivery is tuned, the last job is knowing how to measure all of this honestly. Measurement next →

    We use cookies

    We use cookies to improve your experience, analyze site traffic, and personalize content. You can customize your preferences at any time.

    Learn more: Cookie PolicyPrivacy Policy

    Customize