Skip to content

Commit 9a9f39d

Browse files
authored
[lighthouse] add redirects reference; update template (google#5997)
* [lighthouse] update template * [lighthouse] add redirects reference
1 parent 5152af0 commit 9a9f39d

File tree

3 files changed

+58
-5
lines changed

3 files changed

+58
-5
lines changed

src/content/en/tools/lighthouse/_toc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ toc:
2020
path: /web/tools/lighthouse/audits/first-meaningful-paint
2121
- title: Has Enormous Network Payloads
2222
path: /web/tools/lighthouse/audits/network-payloads
23+
- title: Has multiple page redirects
24+
path: /web/tools/lighthouse/audits/redirects
2325
- title: JavaScript Bootup Time Is Too High
2426
path: /web/tools/lighthouse/audits/bootup
2527
- title: Keep Server Response Times Low
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
project_path: /web/tools/_project.yaml
22
book_path: /web/tools/_book.yaml
3-
description: Reference documentation for the "AUDIT_NAME" Lighthouse audit.
3+
description: Reference documentation for the "TODO" Lighthouse audit.
44

5-
{# wf_updated_on: 2018-03-29 #}
5+
{# wf_updated_on: 2018-04-02 #}
66
{# wf_published_on: 2018-04-XX #}
77
{# wf_blink_components: Platform>DevTools #}
88

9-
# AUDIT_NAME {: .page-title }
9+
# TODO {: .page-title }
1010

1111
{# wf_ignore_file - REMOVE THIS BEFORE SAVING FILE!! #}
1212

@@ -16,8 +16,8 @@ description: Reference documentation for the "AUDIT_NAME" Lighthouse audit.
1616

1717
## More information {: #more-info }
1818

19-
* Sources
19+
Sources:
2020

2121
* [Audit source][src]{:.external}
2222

23-
[src]: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/AUDIT_NAME
23+
[src]: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/TODO
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

Comments
 (0)