Hi, I’ve done a Lighthouse Report on one of our sites and in the ‘Best Practices’ section it has marked us down saying ‘Links to cross-origin destinations are unsafe’. This is referring to image elements I’ve used with a link and selected ‘New Tab’. It’s saying I need to do the following:
How to improve your site’s performance and prevent security vulnerabilities #
Add rel="noopener"
or rel="noreferrer"
to each link identified in your Lighthouse report. In general, when you use target="_blank"
, always add rel="noopener"
or rel="noreferrer"
:
<a href="https://examplepetstore.com" target="_blank" rel="noopener"> Example Pet Store</a>
I can’t see where there’s an option for me to add the rel="noopener"
there’s just the option next to ‘New Tab’ for ‘nofollow’ which isn’t the same. Can you let me know how I can go about adding the rel="noopener"
to any image links and buttons please.
Here’s a screen grab of the ‘Best Practices’ section on the Lighthouse Report I’m referring to. I’ll add the URL in a secure note.
Thanks!