Bug 104905 - location.reload() loses the referrer (aka referer)
Summary: location.reload() loses the referrer (aka referer)
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: All All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-13 04:54 PST by Walter T
Modified: 2012-12-14 09:50 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter T 2012-12-13 04:54:18 PST
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:

<a href="?one=1">with query string</a><br/>
<script>document.write("referrer: "+document.referrer)</script><br/>
<button onclick="location.reload(true)">reload</button><br/>

1) load this page
2) click on "with query string"
3) notice that the URL now contains the query string, while the referrer does not
4) click the "reload" button
5) notice that the referrer now contains the query string, which it shouldn'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.
Comment 1 Walter T 2012-12-13 04:56:21 PST
sorry, document.reload() is to be replaced with location.reload() in the first comment.