Lighthouse audit document-latency-insight · Performance

"Document request latency": how to fix it in Lighthouse

Quick answer: Document request latency is the Lighthouse 13 insight that checks the first request for your HTML. It fails if the page redirects, if the server takes more than 600 ms to respond ("Server responded slowly"), or if the HTML is sent without gzip or Brotli. Fix it by linking to the final URL, caching the HTML at the edge, and enabling compression.
View raw .md for LLMs / your notes

This Lighthouse 13 insight checks one request: the first one, for your HTML document. Nothing else on the page can start until that HTML arrives. The browser cannot discover your CSS, scripts, fonts or the LCP image before it has the document. So every millisecond spent on redirects, on a slow server, or on downloading uncompressed HTML is added to First Contentful Paint and Largest Contentful Paint. The insight runs three checks and fails if any one of them fails. In our study of 269 Shopify storefronts, 53 of them (19.7%) failed it. This page covers what each check measures, what "Server responded slowly" means, and the fixes for each.

TL;DR

What does "Document request latency" mean?

The insight looks at the main document request in the page load trace and reports three checks:

CheckPasses whenFailing text in the report
RedirectsThe browser reached the final URL with no redirectHad redirects (2 redirects, +630 ms)
Server response timeThe server answered in 600 ms or lessServer responded slowly (observed 1,240 ms)
Text compressionThe HTML was sent with gzip, Brotli or another encoding, or compression would save under 1,400 bytesNo compression applied

Server response time here is the wait between the browser sending the request and the first byte of the response arriving, often called time to first byte (TTFB). It is time your server or platform spends building the page, plus the trip to the server. It does not include downloading the HTML.

The 600 ms limit is a pass line, not a target. The Chrome team chose 600 ms to avoid false failures under throttled runs, and the insight estimates savings against a target of 100 ms. A server that answers in 500 ms passes the check and still leaves time on the table.

Is this the same as "Reduce initial server response time"?

Yes, and more. Lighthouse 13 folded three older audits into this one insight:

Older audit (Lighthouse 12 and earlier)Now the check
Reduce initial server response time (server-response-time)Server responds quickly
Avoid multiple page redirects (redirects)Avoids redirects
Enable text compression (uses-text-compression)Applies text compression (for the HTML)

Older tools, plugins and blog posts still print the old titles. The fixes did not change. One difference: this insight checks compression on the HTML document only. Compression of your CSS and JavaScript is covered on the Enable text compression page.

Does Document request latency affect my Performance score?

Not directly. Insights carry no weight in the Lighthouse 13 Performance score. The cost shows up in the metrics. Lighthouse estimates the savings as the server time above 100 ms plus the redirect time, and applies that same amount to both FCP and LCP. A 1,200 ms server response and one 300 ms redirect is roughly 1.4 seconds off both metrics.

How do I fix "Server responded slowly"?

1. Cache the full HTML

The biggest win is to stop building the page on every request. Serve the finished HTML from a cache:

Check the response headers in the DevTools Network panel. A header such as cf-cache-status: HIT, x-cache: HIT or age: above zero means the HTML came from a cache. A MISS on every reload means the cache is not storing it, often because of a Set-Cookie header or Cache-Control: private on the response.

2. Make the uncached request faster

When a page cannot be cached, profile the request on the server:

A Server-Timing response header lets you see the server's own breakdown in the DevTools Network panel, under the Timing tab of the document request.

3. Move the server closer, or put a CDN in front

Distance adds time to every request. The lab run happens from a Google data center, and real visitors connect from everywhere. A CDN that terminates connections near the visitor and keeps a warm connection to your origin cuts that part, even before it caches anything.

How do I fix "Had redirects"?

Every redirect is a full extra request before the HTML. The common chains are http:// to https://, bare domain to www, a missing or extra trailing slash, and a geo or language redirect.

  1. Test the exact URL you audited with curl -sIL https://example.com/page and count the Location: headers.
  2. Link, canonicalize and list in your sitemap the final URL, so visitors and Lighthouse land on it directly.
  3. Collapse chains on the server into one hop, and turn on HSTS so returning browsers skip the http:// redirect.
  4. Avoid redirecting mobile visitors to a separate URL.

The Avoid multiple page redirects page covers redirect chains, 301 vs 302 vs 308, and redirect loops in detail.

How do I fix "No compression applied"?

The HTML went out uncompressed. Turn on Brotli (preferred) or gzip for text/html at the server or CDN. Then check the document request in the Network panel: the response should carry content-encoding: br or content-encoding: gzip. If your origin compresses but the response arrives uncompressed, a proxy in between is stripping it.

How do I fix it on WordPress, Shopify, or Next.js?

How do I verify the fix?

  1. Re-run Lighthouse. All three checks under Document request latency should pass.
  2. Reload a few times in the DevTools Network panel and read the document request's Timing tab. "Waiting for server response" should be well under 600 ms on a cache hit.
  3. Check field data. PageSpeed Insights shows Time to First Byte from the Chrome UX Report when your site has enough traffic. The lab run is one request from one place; the field number is your real visitors.

What mistakes should I avoid?


Audit your URL at https://lighthouse-md.com.

Audit your page now

Paste your URL, get scores plus a CLAUDE.md plan for Claude Code.

Run audit →
Add us as a preferred source on Google

One click, and Google shows more of lighthouse-md.com in your search results.