Referrer Policy Test

Understand how the Referrer-Policy header affects what information is sent when navigating between pages.

Current Page Referrer Info

Interactive Test

Select a referrer policy and click a link to see what referrer is sent.

Tip: Open DevTools Network tab before clicking. Look for the "Referer" request header to see what was sent.

Referrer Policy Reference

no-referrerHigh Privacy

Never send the Referer header

https://example.com/page → (nothing)

no-referrer-when-downgradeLow Privacy

Send full URL unless going from HTTPS to HTTP

https://example.com/page → https://example.com/page

originMedium

Send only the origin (domain), not the path

https://example.com/page → https://example.com/

origin-when-cross-originMedium

Full URL for same-origin, origin only for cross-origin

Cross-origin: https://example.com/page → https://example.com/

same-originHigh Privacy

Send full URL only for same-origin requests

Cross-origin: (nothing)

strict-originMedium

Send origin only, but not on HTTPS→HTTP

https://example.com/page → https://example.com/

strict-origin-when-cross-originMedium

Full URL for same-origin, origin for cross-origin (default)

Default browser policy for most browsers

unsafe-urlLow Privacy

Always send full URL (including path and query)

https://example.com/secret?token=123 → https://example.com/secret?token=123

Security Recommendations

Use strict-origin-when-cross-origin as a balanced default. It protects path information on cross-origin requests while allowing same-origin referrer.

Use no-referrer for links to external sites where you want maximum privacy.

Avoid unsafe-url as it can leak sensitive data in URLs (tokens, session IDs, etc.).

How to Set Referrer-Policy

HTTP Header

Referrer-Policy: strict-origin-when-cross-origin

Meta Tag

<meta name="referrer" content="strict-origin-when-cross-origin">

Per-Link Attribute

<a href="https://example.com" referrerpolicy="no-referrer">Link</a>