Using the Correct noopener, noreferrer, and nofollow Attributes to Prevent Reverse Tabnabbing Attacks

Using the Correct noopener, noreferrer, and nofollow Attributes to Prevent Reverse Tabnabbing Attacks

💡 原文英文,约1600词,阅读约需6分钟。
📝

内容提要

本文介绍了在网站上点击链接时如何防止旧标签页被重定向到钓鱼网站。通过在锚标签的rel属性中设置noopener值,可以阻止新标签页访问旧标签页。同时,还介绍了noreferrer和nofollow的用法。noreferrer与noopener功能类似,还可以隐藏引荐信息。nofollow用于不认可链接,不传递页面排名值。建议在所有target="_blank"的链接上使用noopener,不支持noopener的浏览器可以使用noreferrer。如果不想认可链接,可以使用nofollow。

🏷️

标签

➡️

继续阅读