Page 1 of 1

Developers: What do I need to know about Goanna?

Posted: 2015-08-08, 08:18
by Moonchild
Updated 2015-11-02 with the finalized data for the useragent
Please see the updated post about user-agent strings for current information.

What do I need to know about Goanna?
Note: this FAQ is aimed at technical software&web developers.

As a web developer and add-on developer, you may need to know a few things about Goanna, the gecko-derived engine in Pale Moon 26 and later.
I'll keep an overview in this FAQ entry, and list things that are in development and things that have been finalized.

User agent product slice
Goanna 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:
Mozilla/5.0 ({p}; [{p2};] [{a};] rv:{rv}|{compat}) [Gecko slice] Goanna/{bid}|{rv} [Firefox/{compat}] 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
{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

This will be either in native mode or compatibility mode
Examples:
Native mode: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Goanna/20150801 PaleMoon/26.0.0b3
Native mode: Mozilla/5.0 (Windows NT 6.3; x64; rv:2.0) Gecko/20100101 Goanna/20151208 PaleMoon/26.0.0
Compatibility mode: Mozilla/5.0 (Linux; X11; rv:38.9) Gecko/20100101 Goanna/2.1 Firefox/38.9 PaleMoon/26.2.1
Compatibility mode: Mozilla/5.0 (Windows NT 6.2; rv:38.9) Goanna/2.0 Firefox/38.9 PaleMoon/26.0.0


Application info platform version
If you rely on the appInfo.platformVersion token in your extension or app programming, you may run into the issue that Goanna will present an unexpected low number for the platform version (because of its uncoupled nature from the product version).
When wanting to provide Goanna compatibility, you should use the application version for an equivalent check on "rough Firefox range compatibility".

The platformVersion will always reflect the real Goanna platform version (2.0, 2.1, etc.) but there will be different appInfo fields you can check to know what you're running on. This is preferred from our side, since it avoids complexity (for us as well as you) by avoiding having to "fake" who we are and introducing a secondary version number.

navigator.* fields
If your code is still relying on the archaic "navigator" fields like navigator.product or navigator.productsub then please understand that these fields are being dropped from web standards and you should remove them from your code as soon as feasible.
Like all other current browsers, Goanna will identify itself in these fields as "Netscape" as application and "Gecko" as product. See also the HTML living standard section about this.

Re: Developers: What do I need to know about Goanna?

Posted: 2015-11-02, 20:16
by Moonchild
Updated the original post with finalized data.

Re: Developers: What do I need to know about Goanna?

Posted: 2016-01-28, 06:48
by sonthakit
I have a question.

Due to Palemoon 26 use Goanna version 2
What should I put in install.rdf if I want compatiblity both Palemoon 25 and 26

<em:targetApplication>
<!-- Pale Moon -->
<Description>
<em:id>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</em:id>
<em:minVersion>25.0</em:minVersion>
<em:maxVersion>25.*</em:maxVersion>
</Description>
</em:targetApplication>

Should I use version 2-25 or 25-26?

Sonthakit

Re: Developers: What do I need to know about Goanna?

Posted: 2016-01-28, 22:39
by Moonchild
The Goanna version is the platform version. Extensions check the product version.
So, you only have to worry about the actual product version in your install.rdf -- and 25-26.* is what you would need for extension compatibility.