When should I use rel=noreferrer?

前端 未结 4 506
长情又很酷
长情又很酷 2021-01-02 15:40

I have to link some other external sites.

I know when to use nofollow. But I am not clear when I should use rel=noreferrer.

4条回答
  •  梦谈多话
    2021-01-02 16:28

    As @unor said, it hides referrer information when the link is clicked. Basically this is a privacy enhancement, when you want to hide information for owner of the domain of a link where is clicked that the user came from your website.

    Example:

    User is on your website www.mywebsite.com, there you have a Link when someone clicks the "Link" the owner of newsite.com knows it came from www.mywebsite.com. By setting rel=noreferrer you prevent revealing this information.

    A good example how it works is starting from 21:28 of this conference talk. This is considered to be a good practice when working with server-side (e.g. Node.js). You can also read about this on the Helmet documentation.

提交回复
热议问题