Controlling what the Referer header leaks
The Referrer-Policy header (and the equivalent <meta name="referrer"> tag
and per-element referrerpolicy attribute) decides how much of the current
URL is placed in the Referer request header when the browser follows a link
or loads a subresource. This reference lists all eight values and shows the
exact referrer sent in each navigation scenario.
How it works
For every outgoing request the browser computes a referrer string from the current document’s URL, trimmed according to the active policy. The key distinctions are: full URL versus origin-only, whether cross-origin requests are treated differently, and whether an HTTPS-to-HTTP downgrade suppresses the referrer:
Referrer-Policy: strict-origin-when-cross-origin
For example, on a page at https://shop.example/cart?id=9, a same-origin
request sends the full URL, a cross-origin HTTPS request sends only
https://shop.example/, and an HTTPS-to-HTTP request sends nothing.
Tips and notes
strict-origin-when-cross-originis the safe modern default — prefer it.- Use
no-referrerfor maximum privacy when you never need the Referer downstream. - Avoid
unsafe-url; it leaks full path and query to third parties. - Set per-link policy with
<a referrerpolicy="...">for fine control. - Origin-only values still leak which site the user came from, just not the path.