Open
Bug 1705326
Opened 4 years ago
Updated 3 years ago
navigator.userAgent still returns custom UA after clearing browsingContext.customUserAgent if a reload happened while the custom UA was set
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: nchevobbe, Unassigned)
Details
Attachments
(1 obsolete file)
Steps to reproduce
- On a non data url document
- execute
browsingContext.customUserAgent = "custom"
- reload the page (
navigator.userAgent
does return"custom"
) - execute
browsingContext.customUserAgent = ""
to clear the custom user agent - Evaluate
navigator.userAgent
in the page
Expected results
I get the initial UA value
Actual results
I still get the custom user agent value
That's seemed to be caused by retrieving the UA from the User-Agent header (https://searchfox.org/mozilla-central/rev/0b90e582d2f592a30713bafc55bfeb0e39e1a1fa/dom/base/Navigator.cpp#2024-2031)
https://phabricator.services.mozilla.com/D112159 modifies docshell/test/browser/browser_ua_emulation.js
to demonstrate the issue
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
Farre, can you set the severity and priority on this one, please?
Flags: needinfo?(afarre)
Updated•4 years ago
|
Severity: -- → S3
Flags: needinfo?(afarre)
Priority: -- → P3
Updated•3 years ago
|
Attachment #9216024 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•