xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

HTML link rel noopener & noreferrer All In One

HTML link rel noopener & noreferrer All In One

Web 安全

image

<a target="_blank" rel="noopener noreferrer">
  Web Security A link ✅
</a>



<a>
  Not Security A link ❌
</a>

noopener & noreferrer

<a target="_blank"> === <a rel="noopener">

image

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/noopener

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/noreferrer

window.opener;
// null

image

https://developer.mozilla.org/en-US/docs/Web/API/Window/opener

https://mathiasbynens.github.io/rel-noopener/

MDN & GitHub

https://github.com/mdn/content/blob/main/files/en-us/web/html/attributes/rel/noreferrer/index.md?plain=1

https://github.com/mdn/content/blob/main/files/zh-cn/web/html/attributes/rel/noreferrer/index.md?plain=1

https://github.com/mdn/content/blob/main/files/zh-hans/web/html/attributes/rel/noreferrer/index.md?plain=1

Referer HTTP request header

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer

Referrer-Policy

image

image

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

https://youtu.be/ydkQlJhodio?t=50

https://stackoverflow.com/questions/50709625/link-with-target-blank-and-rel-noopener-noreferrer-still-vulnerable



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-01-26 23:03  xgqfrms  阅读(37)  评论(0编辑  收藏  举报