Early Access

Link

noopener

Learn how to use the noopener rel link tag to improve your site.

The noopener link relation is utilized to enhance security when opening a link in a new browsing context (e.g., a new tab or window). It prevents the newly opened page from having access to the originating page's window object, mitigating potential malicious attacks, such as phishing.

Code Examples

<a href="https://example.com" rel="noopener" target="_blank">External Link</a>
Correctly combines both noopener and _blank, ensuring security without compromising functionality.
<a href="https://example.com" target="_blank">External Link</a>
Omits rel="noopener", potentially exposing the page to security risks associated with the use of target="_blank".

Recommendations

  • Always Use with _blank
    When using target="_blank" for opening links in new tabs or windows, always include rel="noopener" to ensure a higher level of security.
  • Combine with noreferrer for Extra Privacy
    Combining rel="noopener noreferrer" can also prevent the referral information from being passed to the new page, offering additional privacy besides security benefits.

Related Documentation