|
| 1 | +project_path: /web/tools/_project.yaml |
| 2 | +book_path: /web/tools/_book.yaml |
| 3 | +description: Reference documentation for the "Has multiple page redirects" Lighthouse audit. |
| 4 | + |
| 5 | +{# wf_updated_on: 2018-04-02 #} |
| 6 | +{# wf_published_on: 2018-04-02 #} |
| 7 | +{# wf_blink_components: Platform>DevTools #} |
| 8 | + |
| 9 | +# Has multiple page redirects {: .page-title } |
| 10 | + |
| 11 | +## Overview {: #overview } |
| 12 | + |
| 13 | +Redirects slow down your page load speed. |
| 14 | + |
| 15 | +When a browser requests a resource that has been redirected, the server usually |
| 16 | +returns an HTTP response like this: |
| 17 | + |
| 18 | + HTTP/1.1 301 Moved Permanently |
| 19 | + Location: /path/to/new/location |
| 20 | + |
| 21 | +The browser must then make another HTTP request at the new location in order to |
| 22 | +retrieve the resource. This additional trip across the network can delay the |
| 23 | +loading of the resource by hundreds of milliseconds. |
| 24 | + |
| 25 | +## Recommendations {: #recommendations } |
| 26 | + |
| 27 | +Your Lighthouse report lists resources that are being redirected. |
| 28 | +Update the links to these resources. The links should |
| 29 | +point to the current locations of the resources, so that the redirects are |
| 30 | +eliminated. It's especially important to avoid redirects in resources that |
| 31 | +are required for your [Critical Rendering Path][CRP]. |
| 32 | + |
| 33 | +[CRP]: /web/fundamentals/performance/critical-rendering-path/ |
| 34 | + |
| 35 | +If you're using redirects to divert mobile users to the mobile version of your |
| 36 | +page, consider re-designing your site to use [Responsive Design][RD]. |
| 37 | + |
| 38 | +[RD]: /web/fundamentals/design-and-ux/responsive/ |
| 39 | + |
| 40 | +## More information {: #more-info } |
| 41 | + |
| 42 | +A page fails this audit when it has 2 or more redirects. |
| 43 | + |
| 44 | +Sources: |
| 45 | + |
| 46 | +* [Redirections in HTTP][MDN]{:.external} |
| 47 | +* [Avoid Landing Page Redirects](/speed/docs/insights/AvoidRedirects) |
| 48 | +* [Audit source][src]{:.external} |
| 49 | + |
| 50 | +[MDN]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections |
| 51 | +[src]: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/redirects.js |
0 commit comments