referrerreferrer-policy

is "referrerpolicy" a valid attribute of <a>?


Ok 'cause I was seeing on W3Schools and it enlists on the "Attributes" table of <a> element the referrerpolicy attribute. So I want to know if this is possible and how it works.


Solution

  • Like W3C says :

    The Referrer-Policy HTTP header governs which referrer information, sent in the Referer header, should be included with requests made.

    That mean that you can configure if the target website will have access to the referrer information.

    For example: Use <a href="http://example.com" referrerpolicy="origin"> to only give access to the origin information to the target.

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