What is Pale Moon's user-agent string?

Frequently Asked Questions about the Pale Moon browser and their answers.
User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 36731
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

What is Pale Moon's user-agent string?

Unread post by Moonchild » 2022-05-05, 08:43

Primarily for web developers
This is an update to the old Goanna post detailing user-agent strings and general information.

What is Pale moon's user-agent string?

The string depends on which compatibility mode users have set the browser in; this is detailed below.

Critical notes before you start:
  • User-agent sniffing is a very bad idea with many pitfalls. Please do not use it.
  • User-agent sniffing for feature detection is a very bad and labour intensive method that requires you to have a continually-updated table of user agents against feature sets, which is pretty much impossible to maintain properly. Please use direct feature detection instead of considering this string match.
  • User-agent sniffing for integrity checking and verification is totally wrong. User-agent strings can be easily spoofed (and are regularly spoofed), including by malware. Gatekeeping based on user-agents and short-lists of "accepted" strings (I'm looking at you, USA bank websites!) is folly and will never keep bad actors out (because they can spoof anything that is on the list of accepted strings...)
  • User-agent sniffing plays in favour of browser monoculture, discrimination of independent software vendors and discrimination of Open Source projects and forks. Practical implementations often only allow "mainstream" user-agent strings to "pass the bar" and any deviation, including an identifier of a derivative product, is often seen as an "invalid" string with the result of legitimate users being blocked from accessing websites.
  • Depending on user configuration, web browser users may also have opted to override the user-agent string with something arbitrary, or even use semi-randomized strings to try and combat fingerprinting which may run into the "security" checks that base on a dumb user-agent string comparison.
User agent product slice
Pale Moon in a default setup will have a user agent product slice with Goanna/{buildid} or Goanna/{version} where {buildid} will be the yyyymmdd formatted build date for the binary.
This Goanna/* slice will always be present in Goanna-based products. Whether the latter part is {buildid} or {version} depends on the compatibility mode selected.

User agent string format for Pale Moon
The overall user agent string format is:
Firefox Compatibility mode (default):
Mozilla/5.0 ({p}; [{p2};] [{a};] rv:{compat}) {Gecko slice} Goanna/{rv} Firefox/{compat} PaleMoon/{pv}
Gecko compatibility mode:
Mozilla/5.0 ({p}; [{p2};] [{a};] rv:{compat}) {Gecko slice} Goanna/{rv} PaleMoon/{pv}
Native mode:
Mozilla/5.0 ({p}; [{p2};] [{a};] rv:{rv}) Goanna/{bid} PaleMoon/{pv}

Please keep in mind that users may at any time opt to override these default user-agent strings.
Other applications building on Goanna and the UXP platform will have a different Application Name instead of PaleMoon/{pv}

Items between square brackets are optional and may or may not be present. As a web/app designer you should never assume that these items are present, and if you use UA sniffing, take into account that the UA string may have optional items omitted.
{p} = platform
{p2} = additional platform indicators (one or more)
{a} = architecture
{rv} = Goanna platform revision as major.minor - unlike Mozilla, this will not be the same as the product version
{compat} = Firefox compatibility application version (arbitrary)
{bid} = Build ID (build date) in the format yyyymmdd
{Gecko slice} = if enabled for compatibility reasons with websites, will be a static Gecko/20100101 slice to indicate ancestry
Firefox/{compat} slice = if enabled for compatibility reasons, will be a static Firefox/{version} token to indicate ancestry
{pv} = Pale Moon product version

Examples:
Native mode: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:4.8) Goanna/20220409 PaleMoon/29.4.6
Gecko Compatibility mode: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Goanna/4.8 PaleMoon/29.4.6
Firefox Compatibility mode: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 PaleMoon/29.4.6
{{This headspace for lease}}
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked