Page MenuHomePhabricator

Add "Referrer-Policy: no-referrer" to standard HTTP headers
ClosedPublic

Authored by epriestley on Feb 27 2018, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 9, 5:33 AM
Unknown Object (File)
Sun, Feb 9, 5:33 AM
Unknown Object (File)
Sun, Feb 9, 5:33 AM
Unknown Object (File)
Sun, Feb 9, 5:33 AM
Unknown Object (File)
Sat, Feb 8, 10:47 AM
Unknown Object (File)
Feb 2 2025, 1:50 PM
Unknown Object (File)
Jan 31 2025, 3:13 PM
Unknown Object (File)
Jan 29 2025, 10:40 AM
Subscribers
None

Details

Summary

Ref T4340. Some browsers respect this header and referrers are a plague upon the earth.

Also, upgrade "never" to the more modern value "no-referrer".

Test Plan

In Safari, Firefox and Chrome, disabled rel="noreferrer" on links and generated a normal link to an external site. Then clicked it and checked if a referrer was sent.

  • Safari respects meta only, but "no-referrer" is fine.
  • Firefox respects both (either the header or meta tag are individually sufficient to stop referrers).
  • Chrome respects both (same as Firefox).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Feb 27 2018, 8:59 PM
This revision was automatically updated to reflect the committed changes.