HTML <link> referrerpolicy Attribute
Definition and Usage
referrerpolicy
The attribute specifies the referrer information to be used when accessing the resource.
Example
The specification does not send the referrer information along with the request to the external stylesheet:
<link rel="stylesheet" href="https://www.codew3c.com/w3.css" referrerpolicy="no-referrer">
Syntax
<link referrerpolicy="no-referrer|no-referrer-when-downgrade|origin|origin-when-cross-origin|unsafe-url">
Attribute Value
Value | Description |
---|---|
no-referrer | Referrer information will not be sent with the request. |
no-referrer-when-downgrade | Default. The referrer header will not be sent to the source without HTTPS. |
origin | Send only the protocol, host, and port to the request client. |
origin-when-cross-origin | For cross-domain requests: send only the protocol, host, and port. For same-origin requests: also include the path. |
unsafe-url | Send the source, path, and query string (but not the fragment, password, or username). This value is considered insecure. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
51.0 | 79.0 | 50.0 | 11.1 | 38.0 |