This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[lighthouse] add "mixed content" reference #5758
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+59 KB
src/content/en/tools/lighthouse/audits/images/insecure-content-blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
project_path: /web/tools/_project.yaml | ||
book_path: /web/tools/_book.yaml | ||
description: Reference documentation for the "Some Insecure Resources Can Be Upgraded To HTTPS" Lighthouse audit. | ||
|
||
{# wf_updated_on: 2018-02-06 #} | ||
{# wf_published_on: 2018-02-06 #} | ||
{# wf_blink_components: Platform>DevTools #} | ||
|
||
# Some Insecure Resources Can Be Upgraded To HTTPS {: .page-title } | ||
|
||
## Overview {: #overview } | ||
|
||
When a secure (HTTPS) site requests an insecure (HTTP) resource, that is called a [mixed | ||
content][MC] error. Some browsers block insecure resource requests by default. If your page | ||
depends on these insecure resources, then your page might not work properly when they get blocked. | ||
|
||
[MC]: /web/fundamentals/security/prevent-mixed-content/what-is-mixed-content | ||
|
||
<figure> | ||
<img src="images/insecure-content-blocked.png" | ||
alt="Google Chrome (version 66) blocking insecure content."/> | ||
<figcaption> | ||
<b>Figure X</b>. Google Chrome (version 66) blocking insecure content | ||
</figcaption> | ||
</figure> | ||
|
||
Also, browsers may warn users that your page is not fully secure. | ||
|
||
<figure> | ||
<img src="images/not-fully-secure.png" | ||
alt="Google Chrome (version 66) reporting that page is not fully secure."/> | ||
<figcaption> | ||
<b>Figure X</b>. Google Chrome (version 66) reporting that a page is not fully secure | ||
</figcaption> | ||
</figure> | ||
|
||
## Recommendations {: #recommendations } | ||
|
||
For each URL that Lighthouse lists, modify your code to request that URL over HTTPS: | ||
|
||
https://example.com | ||
|
||
Rather than HTTP: | ||
|
||
http://example.com | ||
|
||
Even if you are not ready to fully upgrade your site to HTTPS yet, upgarding some URLS to | ||
HTTPS can increase the security of your users and make it easier for you to avoid mixed | ||
content warnings when you do upgrade to HTTPS in the future. See [Uses HTTPS][https] for | ||
recommendations on how to upgrade your site to HTTPS. | ||
|
||
Insecure resources which are not upgradeable to HTTPS may require other changes. Contact the | ||
providers of these resources to explore your options. | ||
|
||
[https]: /web/tools/lighthouse/audits/https#recommendations | ||
|
||
## More information {: #more-info } | ||
|
||
Lighthouse loads the page once to record the URL of each resource requested. Then, Lighthouse | ||
loads the page again, but this time intercepts each request and tries to upgrade the URL to | ||
use HTTPS. If the upgraded requests succeed, Lighthouse reports that request as upgradeable in | ||
the audit results. | ||
|
||
[Audit source][src]{:.external} | ||
|
||
[src]: https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/mixed-content.js |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the figures be numbered 1/2/etc. for the final version?