Intermediate
HTML & CSS
Q79 / 100
What is the purpose of the "rel=\"noopener noreferrer\"" attribute on a link opened with "target=\"_blank\""?
Correct! Well done.
Incorrect.
The correct answer is B) It prevents the newly opened page from gaining access to the originating window via window.opener (security) and prevents the referrer information from being sent (privacy)
B
Correct Answer
It prevents the newly opened page from gaining access to the originating window via window.opener (security) and prevents the referrer information from being sent (privacy)
Explanation
Without rel="noopener", a page opened via target="_blank" can use window.opener to manipulate the original tab, a known security risk; "noreferrer" additionally strips referrer information sent to the new page.
Progress
79/100