HTML referrerpolicy Attribute
The referrerpolicy attribute controls how much referrer information is sent when a resource is fetched or a link is followed.
Description
The referrerpolicy attribute sets the Referrer Policy for a request made by the element, controlling how much of the current page's URL is sent in the Referer header when a link is followed or a resource is loaded. It overrides the document's general policy for that one element.
The default for most browsers is strict-origin-when-cross-origin, which sends the full URL to the same site but only the origin to other sites, and nothing when going from HTTPS to HTTP. no-referrer sends nothing at all, which is useful for links to external sites when the URL may contain private information.
Syntax
<tagname referrerpolicy="value">
Values
- no-referrerNo Referer header is sent.
- no-referrer-when-downgradeThe full URL is sent unless going from HTTPS to HTTP.
- originOnly the origin (scheme, host and port) is sent.
- origin-when-cross-originThe full URL for same-origin requests, only the origin otherwise.
- same-originThe full URL for same-origin requests, nothing for cross-origin requests.
- strict-originOnly the origin, and nothing when going from HTTPS to HTTP.
- strict-origin-when-cross-originThe default. The full URL for same-origin requests, only the origin for cross-origin requests, nothing when downgrading to HTTP.
- unsafe-urlThe full URL is always sent (not recommended).
Applies To
Example
Browser Support
The following information will show you the current browser support for the HTML referrerpolicy attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.
Desktop





Tablets & Mobile





