

Hasty Treat - Target=_blank security issue? What's the deal with noopener and noreferrer?
Jul 27, 2020
Discover the importance of using 'noopener' and 'noreferrer' with 'target=_blank' links to enhance security. The hosts delve into the risks of these links, particularly how malicious sites can exploit them. They discuss why browsers haven't universally adopted fixes, despite some improvements. Learn about potential SEO impacts and analytics challenges when passing traffic between sites. This engaging conversation emphasizes why understanding these technical aspects is crucial for web developers.
AI Snips
Chapters
Transcript
Episode notes
noopener and noreferrer
- Use
rel="noopener"
andrel="noreferrer"
withtarget="_blank"
links. - This prevents the linked site from accessing the original window's data.
noreferrer Impact on Analytics
- The
rel="noreferrer"
attribute strips referrer headers. - This breaks analytics for the recipient site, making referral visits appear as direct traffic.
RetailMeNot Example
- RetailMeNot uses
target="_blank"
to open coupon codes while redirecting to the retailer's site. - This lets them gain affiliate revenue via referrer headers.