Closed Bug 1773192 Opened 2 years ago Closed 2 years ago

Referer header missing after calling history.replaceState and clicking back button

Categories

(Core :: DOM: Core & HTML, defect)

Firefox 101
defect

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: peterd, Assigned: peterv)

References

Details

Attachments

(2 files)

Attached file ref.zip

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

Follow the hyperlink on ref1.html (attached) and click back button to return to ref1.html

ref1.html links to ref2.html

ref2.html has some javascript to cut itself out of history
history.replaceState({},"",document.referrer);
and then loads ref3.html

Browser back button in ref3.html correctly loads ref1.html yet the http referer header is missing.

Actual results:

When clicking back button from ref3.html referer http header is not transmitted with the request to ref1.html.

Expected results:

When clicking back button from ref3.html referer http header should be transmitted with the request to ref1.html.

This worked in earlier versions of Firefox at least 72.0.2 and also works in Chrome 102.

Without the referer header web app does not display data and navigation is broken.

Assignee: nobody → peterv
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
See Also: 1772739
Severity: -- → S2
Attachment #9281089 - Attachment description: WIP: Bug 1773192 - Referrer header missing after calling history.replaceState and clicking back button. → Bug 1773192 - Referrer header missing after calling history.replaceState and clicking back button.
Pushed by pvanderbeken@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ddd77b1f6cf2
Referrer header missing after calling history.replaceState and clicking back button. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
QA Whiteboard: [qa-103b-p2]
See Also: → 761152
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: