Hi,
We are encountering an issue with how document.referrer behaves in Firefox. In our application, we track the source of traffic using document.referrer. While this fu… (read more)
Hi,
We are encountering an issue with how document.referrer behaves in Firefox. In our application, we track the source of traffic using document.referrer. While this functionality works consistently in Safari and Chrome, it does not produce the expected results in Firefox most of the time.
For comparison:
In Safari and Chrome, document.referrer reliably provides the referring URL, as expected.
In Firefox, the value is often empty or incorrect, leading to inconsistent tracking results.
I’ve attached a screenshot that demonstrates the issue for your reference.
Issue Details with Screenshots:
Direct URL Open (Expected Behavior)
In the first screenshot, we directly open the URL. As expected, document.referrer is empty because there is no referrer when the URL is opened directly.
Screenshot 1: https://app.screencast.com/hgdoASFVXaozl
Clicking a Link (Unexpected Behavior)
In the second screenshot, we click on a link from within our site. When we check document.referrer in the file, it still shows as empty, which is incorrect. The referrer should reflect the URL of the linking page.
Screenshot 2: https://app.screencast.com/CzJZLBUJET9XQ
This discrepancy is impacting our ability to accurately track traffic sources.
Additional Note:
I intended to report this issue on Bugzilla, but I have not received the account verification email despite waiting for 3-4 days. Without access to my Bugzilla account, I’m submitting the issue here instead.
Please let me know if you need further clarification or additional examples.
This discrepancy is impacting our ability to accurately track traffic sources. We believe there might be a bug causing this behavior and would appreciate it if your team could investigate.
Thank you for your support and looking forward to your feedback!