The referrerpolicy attribute controls how much referrer data the browser sends in the HTTP Referer header when that element navigates or fetches a resource. Use it on <a>, <area>, <img>, <iframe>, <link>, and <script>.
Default (when omitted/invalid): strict-origin-when-cross-origin. Page-wide alternatives: HTTP Referrer-Policy header or <meta name="referrer">. Related: rel="noreferrer" (no dash).
Baseline · Widely available.
Not deprecated. Note the spelling split: header Referer is misspelled; attribute/policy names use referrer.
Avoid unsafe-url unless you truly need it.
It can leak full HTTPS paths (and queries) to any destination, including HTTP. Prefer stricter policies for privacy.
Syntax
HTML Syntax
syntax.html
<a href="…" referrerpolicy="policy">
<img src="…" referrerpolicy="policy">
In JavaScript: element.referrerPolicy = "no-referrer" (capital P in the IDL property).
Values
Attribute Values
Common policies (from page https://example.com/page?q=1):
referrerpolicy="no-referrer" omits the Referer header.
Click navigates to the URL as usual.
Destination does not see your page path.
rel="noopener" is separate — recommended with target="_blank".
Example 2 — Referrer on Image Requests
Limit what third-party image hosts learn about your page.
HTML
<img src="/images/javascript.png"
alt="Demo image"
width="128" height="128"
referrerpolicy="origin">
<p>Cross-origin hosts would see only your origin, not the full path.</p>
rel="noreferrer" forces no referrer for that link.
Spelling: link type has no dash; meta/HTTP use referrer.
Prefer the attribute when you need origin or the default strict policy.
Edge Cases & Pitfalls
Privacy bugs usually come from oversharing paths or mixing up spellings.
default
Default is already fairly strict
strict-origin-when-cross-origin strips paths on cross-origin HTTPS and blocks HTTPS→HTTP referrers.
leak
Skip unsafe-url by default
Full URLs can include private path segments and query tokens.
meta
Document policy vs element policy
HTTP header / <meta name="referrer"> set the baseline; element referrerpolicy applies to that fetch/navigation.
list
Comma-separated fallbacks are HTTP-only
Multiple policies in one header work for negotiation; the HTML attribute takes a single token.
spell
Referer vs referrer
The request header keeps the historical misspelling; attributes and policies use “referrer”.
Compatibility
Browser Support
referrerpolicy is an HTML attribute implementing Referrer Policy on links and resource elements. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
referrerpolicy
Supported in modern browsers on a, area, img, iframe, link, and script. Prefer strict policies; treat unsafe-url as an exception.
96%Global support (approx.)
Google ChromeYes
Full support
Mozilla FirefoxYes
Full support
Apple SafariYes
Full support
Microsoft EdgeYes
Full support
OperaYes
Full support
Samsung InternetYes
Full support
Internet ExplorerNo
Not supported
referrerpolicyWidely supported
Bottom line: Safe to use for privacy-minded links and embeds. Start from the default or no-referrer/origin when you need less sharing.
Remember
Key Takeaways
Role: control Referer for that element’s request.
Default:strict-origin-when-cross-origin.
Works on a, area, img, iframe, link, script.
Avoidunsafe-url for everyday use.
One line:referrerpolicy decides how much of your URL other sites see when users follow that link or load that resource.
Frequently Asked Questions
It sets how much referrer information the browser sends in the Referer header when following a link or fetching a resource from that element (a, area, img, iframe, link, script).
strict-origin-when-cross-origin: full URL for same-origin requests, origin only for secure cross-origin requests, and no referrer when downgrading HTTPS to HTTP.
rel="noreferrer" (no dash) forces no-referrer for that link and also implies noopener behavior for window.opener. referrerpolicy is the dedicated policy attribute with more options.
Yes. Use a Referrer-Policy HTTP header, or <meta name="referrer" content="…">. Element referrerpolicy overrides for that request.
Usually no. It can send full HTTPS paths (and query strings) even to insecure destinations. Prefer stricter policies.
No. It is Baseline widely available and the HTML way to set per-element Referrer Policy.