docs.rodeo

MDN Web Docs mirror

{{HTMLSidebar}} 

The referrer value for the name attribute of the {{htmlelement("meta")}}  element controls the HTTP {{httpheader("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 {{glossary("origin")}}  of the document as the referrer:

<meta name="referrer" content="origin" />

[!WARNING] Dynamically inserting <meta name="referrer"> (with {{domxref("Document.write", "document.write()")}}  or {{domxref("Node.appendChild", "appendChild()")}} ) makes the referrer behavior unpredictable. When several conflicting policies are defined, the no-referrer policy is applied.

Usage notes

A <meta name="referrer"> element has the following additional attributes:

Examples

Removing a referrer from 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" />

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN