Can I build Firefox to make it report Windows as the platform when running on Linux?

3 views
Skip to first unread message

Richmond

unread,
Dec 3, 2022, 5:59:05 AM12/3/22
to firef...@mozilla.org
In the past I have been able to use Linux on Windows only websites by spoofing the user agent. But a particular website now seems to be examining the navigator platform which cannot be spoofed. Is it possible to compile Firefox such that it reports it is running on Windows? I imagine this is in the source code for the JavaScript engine somewhere but I have not been able to find it.

This message below from chromium console suggests these functions will become obsolete next year anyway.

"Audit usage of navigator.userAgent, navigator.appVersion, and
navigator.platform A page or script is accessing at least one of
navigator.userAgent, navigator.appVersion, and
navigator.platform. Starting in Chrome 101, the amount of information
available in the User Agent string will be reduced. To fix this issue,
replace the usage of navigator.userAgent, navigator.appVersion, and
navigator.platform with feature detection, progressive enhancement, or
migrate to navigator.userAgentData. Note that for performance reasons,
only the first access to one of the properties is shown."

See also thread in newsgroup:

alt.comp.software.firefox
Subject = Detecting or Revealing Platform

Emilio Cobos Álvarez

unread,
Dec 3, 2022, 6:38:00 AM12/3/22
to firef...@mozilla.org
navigator.platform can be spoofed by the general.platform.override preference.

 -- Emilio
-- 
You received this message because you are subscribed to the Google Groups "firef...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firefox-dev...@mozilla.org.


Reply all
Reply to author
Forward
0 new messages