[ Web Proxy ]
URL:
Viewing: https://developer.chrome.com/docs/performance/insights/document-latency [Back]  [Original]

Document request latency  |  Performance insights  |  Chrome for Developers Skip to main content
Chrome for Developers [Chrome for Developers]

Document request latency Stay organized with collections Save and categorize content based on your preferences.

Published: Mar 27, 2025

The initial document request for the page is the most important because all network requests and page content depend on it. Optimizing the initial document request improves performance.

What the insight checks

The insight checks if any of the following conditions affected the initial document request:

DevTools reports that the document latency can be reduced by eliminating redirects [DevTools reports that the document latency can be reduced by eliminating redirects] DevTools reports that the document latency can be reduced by eliminating redirects Key point: The Core Web Vitals recommended Time to First Byte (TTFB) time (800 ms) is longer than the server response time recommended by this insight (600ms). This is because TTFB includes the time to do DNS lookup and handle redirects as well as the server response time.

Avoid redirects

Redirects slow down your page load speed. When a browser requests a resource that has been redirected, the server usually returns an HTTP response like this:

HTTP/1.1 301 Moved Permanently
Location: /path/to/new/location

The browser must then make another HTTP request at the new location to retrieve the resource. This additional trip across the network can delay the loading of the resource.

Make sure links point to the current location of a resource. If you're using redirects to divert mobile users to the mobile version of your page, consider redesigning your site to use responsive design.

Reduce server response times

The first step to improve server response times is to identify the core conceptual tasks that your server must complete in order to return page content, and then measure how long each of these tasks takes. Once you've identified the longest tasks, find ways to speed them up.

There are many possible causes of slow server responses and many possible ways to improve:

See the Optimize TTFB guide for more details.

Enable compression

Text compression can reduce the overall size of the initial HTML document. When a browser requests a resource, it will use the Accept-Encoding HTTP request header to indicate what compression algorithms it supports.

Accept-Encoding: gzip, compress, br, zstd

See also Optimize the encoding and transfer size of text-based assets.

Your server should return the Content-Encoding HTTP response header to indicate what compression algorithm it used.

DevTools reports that the document request is using gzip compression [DevTools reports that the document request is using gzip compression] DevTools reports that the document request is using gzip compression

Stack-specific guidance

This insight also offers stack-specific guidance for pages using the following technologies:

WordPress

Drupal

React

Joomla

Magento

Resources

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-27 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-27 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page