The rel="no opener no-referrer" attribute is a security and performance feature added to links in HTML. It is commonly used in conjunction with links that open in a new tab or window (i.e., links with the
target="_blank" attribute). Here's a breakdown of what it does:
1. "no opener"
The noopener value prevents the new tab or window opened by the link from gaining access to the parent page via the
window.opener property in JavaScript.
Without noopener, the newly opened page can execute malicious scripts that manipulate or redirect the original page, creating a
security vulnerability.
This is particularly important when linking to external or untrusted websites.
2. "noreferrer"
The noreferrer value ensures that no referrer information (the URL of the original page) is sent to the new page.
This enhances privacy by preventing the destination site from knowing where the visitor came from.
It also serves as a fallback for browsers that may not support noopener, providing an additional layer of protection.
Why Use rel="noopener noreferrer"?
Security: It prevents potential malicious actions by restricting access to the parent page via
window.opener.
Privacy: It prevents the destination site from tracking the origin of the traffic.
Performance: By not allowing window.opener, it avoids unnecessary memory usage and performance hits caused by maintaining a connection between the two pages.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The
rel="no opener no-referrer"attribute is a security and performance feature added to links in HTML. It is commonly used in conjunction with links that open in a new tab or window (i.e., links with thetarget="_blank"attribute). Here's a breakdown of what it does:1. "no opener"
noopenervalue prevents the new tab or window opened by the link from gaining access to the parent page via thewindow.openerproperty in JavaScript.noopener, the newly opened page can execute malicious scripts that manipulate or redirect the original page, creating a security vulnerability.2. "noreferrer"
noreferrervalue ensures that no referrer information (the URL of the original page) is sent to the new page.noopener, providing an additional layer of protection.Why Use
rel="noopener noreferrer"?window.opener.window.opener, it avoids unnecessary memory usage and performance hits caused by maintaining a connection between the two pages.