This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
The referrer value for the name attribute of the <meta> element controls the HTTP Referer header of requests sent from the document. If specified, you define the referrer using a content attribute in the <meta> element as a keyword value.
For example, the following <meta> element sends the origin of the document as the referrer:
<meta name="referrer" content="origin" />
Warning: Dynamically inserting <meta name="referrer"> (with document.write() or appendChild()) makes the referrer behavior unpredictable. When several conflicting policies are defined, the no-referrer policy is applied.
A <meta name="referrer"> element has the following additional attributes:
contentSets the document referrer. You must define this attribute. Accepts one of the following values:
no-referrerDoes not send an HTTP Referer header.
originSends the origin of the document.
no-referrer-when-downgradeSends the full URL when the destination is at least as secure as the current page (HTTP(S)→HTTPS), but sends no referrer when it's less secure (HTTPS→HTTP). This is the default behavior.
origin-when-cross-originSends the full URL (stripped of parameters) for same-origin requests, but only sends the origin for other cases.
same-originSends the full URL (stripped of parameters) for same-origin requests. Cross-origin requests will contain no referrer header.
strict-originSends the origin when the destination is at least as secure as the current page (HTTP(S)→HTTPS), but sends no referrer when it's less secure (HTTPS→HTTP).
strict-origin-when-cross-originSends the full URL (stripped of parameters) for same-origin requests. Sends the origin when the destination is at least as secure as the current page (HTTP(S)→HTTPS). Otherwise, sends no referrer.
unsafe-URLSends the full URL (stripped of parameters) for same-origin or cross-origin requests.
The following <meta> element specifies that the document shouldn't send a Referer header with HTTP requests from the document:
<meta name="referrer" content="no-referrer" />
| Specification |
|---|
| HTML> # meta-referrer> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
referrer |
17Until Chrome 46,content values weren't constrained to the values listed in the spec. |
79 | 36Thereferrer value wasn't taken into account when navigation was happening via the context menu or middle click until Firefox 39. |
15Until Opera 33,content values weren't constrained to the values listed in the spec. |
11.1 | 18Until Chrome Android 46,content values weren't constrained to the values listed in the spec. |
36Thereferrer value wasn't taken into account when navigation was happening via the context menu or middle click until Firefox for Android 39. |
14Until Opera Android 33,content values weren't constrained to the values listed in the spec. |
12 | 1.0Until Samsung Internet 5.0,content values weren't constrained to the values listed in the spec. |
4.4Until WebView Android 46,content values weren't constrained to the values listed in the spec. |
12 |
Referer header
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta/name/referrer