Bug 277044
| Summary: | Referrer not sent when opening a new tab on same origin | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Compton <desk> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | beidson |
| Priority: | P2 | ||
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Daniel Compton
In Safari, if you open a new tab (Cmd+click on a link) to a page in the same origin, the referrer is not provided, either in headers to the server, or in the JS context under `document.referrer`.
In Chrome and Firefox, the referrer is available to new tabs on the same origin.
I searched and couldn't find any bugs or documentation of this behaviour. I also tried disabling Safari's "Prevent Cross-Site tracking" but there was no change.
Tested in Safari 17.4.1 and STP Release 199 (Safari 18.0, WebKit 19619.1.22.5).
Reproduction steps:
1. Open https://news.ycombinator.com (Referrer-policy: origin)
2. Click a link to a comment thread
3. Run `document.referrer` in the developer console
4. Observe the result is "https://news.ycombinator.com"
5. Go back to https://news.ycombinator.com
6. Middle click on a link to a comment thread
7. Run `document.referrer` in the developer console
8. Observe the result is ""
In Chrome and Firefox, in step 8, they provide a referrer.
I would expect identical referrer behaviour whether a page is loaded via an in-page navigation, or via a new tab, or at the very least, sending the origin.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
*** This bug has been marked as a duplicate of bug 234511 ***