<?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>104905</bug_id>
          
          <creation_ts>2012-12-13 04:54:18 -0800</creation_ts>
          <short_desc>location.reload() loses the referrer (aka referer)</short_desc>
          <delta_ts>2025-09-21 23:50:03 -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>525.x (Safari 3.2)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Walter T">w.t</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>japhet</cc>
    
    <cc>karlcow</cc>
    
    <cc>w.t</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>790509</commentid>
    <comment_count>0</comment_count>
    <who name="Walter T">w.t</who>
    <bug_when>2012-12-13 04:54:18 -0800</bug_when>
    <thetext>document.reload() assumes the referrer to be the current URL, instead of the original referrer.

This behavior is inconsistent with all other major browsers.

To reproduce, paste this into a webpage:

&lt;a href=&quot;?one=1&quot;&gt;with query string&lt;/a&gt;&lt;br/&gt;
&lt;script&gt;document.write(&quot;referrer: &quot;+document.referrer)&lt;/script&gt;&lt;br/&gt;
&lt;button onclick=&quot;location.reload(true)&quot;&gt;reload&lt;/button&gt;&lt;br/&gt;

1) load this page
2) click on &quot;with query string&quot;
3) notice that the URL now contains the query string, while the referrer does not
4) click the &quot;reload&quot; button
5) notice that the referrer now contains the query string, which it shouldn&apos;t (just follow the same steps on any non-WebKit browser)

I set the priority to P2 because this bug (apart from being a problem for a website I work for) should be really easy to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>790512</commentid>
    <comment_count>1</comment_count>
    <who name="Walter T">w.t</who>
    <bug_when>2012-12-13 04:56:21 -0800</bug_when>
    <thetext>sorry, document.reload() is to be replaced with location.reload() in the first comment.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>