Bug 277044 - Referrer not sent when opening a new tab on same origin
Summary: Referrer not sent when opening a new tab on same origin
Status: RESOLVED DUPLICATE of bug 234511
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-24 15:59 PDT by Daniel Compton
Modified: 2024-07-26 09:28 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Compton 2024-07-24 15:59:24 PDT
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.
Comment 1 Alexey Proskuryakov 2024-07-26 09:28:22 PDT

*** This bug has been marked as a duplicate of bug 234511 ***