Open Bug 1809622 Opened 1 year ago Updated 11 months ago

document referrer is always empty if page is served from SW

Categories

(Core :: DOM: Service Workers, defect, P3)

Firefox 108
defect

Tracking

()

People

(Reporter: version.ru, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Steps to reproduce:

  1. Open https://17ggvi.csb.app/foo/index.html page
  2. Reload page in order to activate SW (ServiceWorker)
  3. Click to "5. away" link
  4. Click to "1. foo" link
  5. Evaluate "document.referrer" in the developer console. It will be empty.

Navigation request to page should be served via SW, it's important for reproducing this bug.

Actual results:

document.referrer is empty

Expected results:

document.referrer is not empty

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Component: DOM: Core & HTML → DOM: Service Workers

Thank you for providing a reproduction! Notes for future investigation to start from:

if (aInit.IsAnyMemberPresent()) {
  request->SetReferrer(
      NS_LITERAL_STRING_FROM_CSTRING(kFETCH_CLIENT_REFERRER_STR));
  request->SetReferrerPolicy(ReferrerPolicy::_empty);
}
Severity: -- → S3
Priority: -- → P3
See Also: → 1626192, 1628363, 1626616
Status: UNCONFIRMED → NEW
Ever confirmed: true

I am writing to follow up on this open bug report as it continues to significantly impact our company’s work. Specifically, one of our customers relies on the document.referrer value to be set when navigating to subpages. However, when requests go through our service worker, this property is always empty, causing issues on our customer’s website.

We would greatly appreciate any assistance in resolving this issue as soon as possible.

Flags: needinfo?(smaug)
Flags: needinfo?(smaug) → needinfo?(bugmail)
Flags: needinfo?(bugmail)
You need to log in before you can comment on or make changes to this bug.