Mozilla Developer Network documentation for the target
attribute of HTML <a>
element says:
Note: When using
target
, consider addingrel="noopener noreferrer"
to avoid exploitation of thewindow.opener
API.
What is the meaning of phrase exploitation of the window.opener API
?
Just check this link (Refer), this example has great example exploitation of the window.opener API.
This is something to do with security vulnerability. target="_blank"
vulnerability is extremely common.
rel="noopener"
attribute to any link that has
target="_blank"
. However, Firefox does not support that tag, so you
should actually use rel="noopener noreferrer"
for full coverage.
window.opener API
is used in the new window you just open to attack the window from where it is opened.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With