# Referrerpolicy

> Represents referrer policy values for the referrerpolicy attribute and Referrer-Policy header.

[API reference](/docs/api/index.md) › [HTML Attribute](/docs/extensions/html-attribute/reference/index.md) › [Values](/docs/extensions/html-attribute/reference/values/index.md) › Referrerpolicy

| enum | `UIAwesome\Html\Attribute\Values\Referrerpolicy` |
| --- | --- |
| Backed by | `string` |
| Source | [`src/Values/Referrerpolicy.php`](https://github.com/ui-awesome/html-attribute/blob/main/src/Values/Referrerpolicy.php#L13) |

Represents referrer policy values for the `referrerpolicy` attribute and Referrer-Policy header.

See also: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Referrer-Policy>, <https://w3c.github.io/webappsec-referrer-policy/>.

## Cases

| Case | Value | Description |
| --- | --- | --- |
| <span id="case-NO_REFERRER"></span>`NO_REFERRER` | `'no-referrer'` | `no-referrer` - Referer header will be omitted entirely: requests do not include any referrer information. |
| <span id="case-NO_REFERRER_WHEN_DOWNGRADE"></span>`NO_REFERRER_WHEN_DOWNGRADE` | `'no-referrer-when-downgrade'` | `no-referrer-when-downgrade` - Send the full referrer (origin, path and query) when the security level stays the same or improves. Do not send the Referer header to less secure destinations (HTTPS → HTTP). |
| <span id="case-ORIGIN"></span>`ORIGIN` | `'origin'` | `origin` - Send only the origin (scheme, host and port) as the Referer header value. |
| <span id="case-ORIGIN_WHEN_CROSS_ORIGIN"></span>`ORIGIN_WHEN_CROSS_ORIGIN` | `'origin-when-cross-origin'` | `origin-when-cross-origin` - Send the full referrer for same-origin requests. |
| <span id="case-SAME_ORIGIN"></span>`SAME_ORIGIN` | `'same-origin'` | `same-origin` - Send the full referrer for same-origin requests. |
| <span id="case-STRICT_ORIGIN"></span>`STRICT_ORIGIN` | `'strict-origin'` | `strict-origin` - Send only the origin when the protocol security level stays the same (HTTPS → HTTPS). |
| <span id="case-STRICT_ORIGIN_WHEN_CROSS_ORIGIN"></span>`STRICT_ORIGIN_WHEN_CROSS_ORIGIN` | `'strict-origin-when-cross-origin'` | `strict-origin-when-cross-origin` (default) - Send the full referrer for same-origin requests. |
| <span id="case-UNSAFE_URL"></span>`UNSAFE_URL` | `'unsafe-url'` | `unsafe-url` - Send the full URL (origin, path and query) in all cases, regardless of security. |