<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>277044</bug_id>
          
          <creation_ts>2024-07-24 15:59:24 -0700</creation_ts>
          <short_desc>Referrer not sent when opening a new tab on same origin</short_desc>
          <delta_ts>2024-07-26 09:28:22 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>234511</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Compton">desk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2048190</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Compton">desk</who>
    <bug_when>2024-07-24 15:59:24 -0700</bug_when>
    <thetext>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&apos;t find any bugs or documentation of this behaviour. I also tried disabling Safari&apos;s &quot;Prevent Cross-Site tracking&quot; 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 &quot;https://news.ycombinator.com&quot;
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 &quot;&quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2048635</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-07-26 09:28:22 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 234511 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>