Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Remove mention to non-existing audit
Browse files Browse the repository at this point in the history
Lighthouse audit external-anchors-use-rel-noopener was removed more than a year ago. See GoogleChrome/lighthouse#13298
  • Loading branch information
mrudelle authored Feb 28, 2023
1 parent e0dbd32 commit 7b3eefa
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,6 @@ specification of `rel="noopener"` helps protect users of legacy browsers
including Edge Legacy and Internet Explorer.
{% endAside %}

## How the Lighthouse cross-origin destination audit fails

[Lighthouse](/docs/lighthouse/overview/) flags unsafe links to cross-origin destinations:

<figure>
{% Img src="image/tcFciHGuF3MxnTr1y5ue01OGLBn2/ztiQKS8eOfdzONC7bocp.png", alt="Lighthouse audit showing unsafe links to cross-origin destinations", width="800", height="213" %}
</figure>

Lighthouse uses the following process to identify links as unsafe:

1. Gather all `<a>` tags that contain the `target="_blank"` attribute
but not the `rel="noopener"` or `rel="noreferrer"` attributes.
2. Filter out any same-host links.

Because Lighthouse filters out same-host links,
there's an edge case you should be aware of if you're working on a large site:
if one page contains a `target="_blank"` link to another page on your site without using `rel="noopener"`,
the performance implications of this audit still apply.
However, you won't see these links in your Lighthouse results.

{% Partial 'lighthouse-best-practices/scoring.njk' %}

## How to improve your site's performance and prevent security vulnerabilities

Add `rel="noopener"` or `rel="noreferrer"`
Expand All @@ -75,6 +53,5 @@ post for more information.

## Resources

- [Source code for **Links to cross-origin destinations are unsafe** audit](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/audits/dobetterweb/external-anchors-use-rel-noopener.js)
- [Share cross-origin resources safely](https://web.dev/cross-origin-resource-sharing/)
- [Site isolation for web developers](/blog/site-isolation/)

0 comments on commit 7b3eefa

Please sign in to comment.