Status of this document
This document is the official Mozilla user-agent string specification. However, the following issues are under review and may be revised in the near future:
The original goals:
- Obey the standard described in RFC 1945 and RFC 2068.
- Don't break existing web servers.
- Don't break existing log-file analysis software or user-agent parsing code.
- Keep the User-Agent string reasonably short.
- Use a consistent, obvious, and easy-to-parse format.
Other concerns that came out of discussion:
- Provide date-based version information.
- Address the issue of version modifiers.
- Provide a way for applications that contain Mozilla technology (i.e. Gecko) but are not Mozilla to identify themselves
For browsers based on Mozilla, the user-agent string shall follow the format:
MozillaProductToken (MozillaComment) GeckoProductToken *(VendorProductToken|VendorComment)
Applications that embed the Gecko layout engine shall have user-agent strings that follow the format:
ApplicationProductToken (ApplicationComment) GeckoProductToken *(VendorProductToken|VendorComment)
;Optional Other Comments]
|Major||Integer indicating major release number. In practice, always 5.|
|Minor||If non-zero, it shall be a three-digit, zero-filled number, i.e. |
|Platform||Allowed values: |
|Security||This was removed in mozilla1.9.3b2 as part of http-fingerprint. |
|OS-or-CPU||Values for Windows systems: |
|Localization Information||Language Tag as described in the standards RFC 1945 and RFC 2068. Examples: |
|GeckoVersion||String starting with "rv:" followed by the Gecko version. This is a set of numbers separated by periods, possibly followed by a pre-release indicator (e.g. "a1" for the first alpha).|
The Gecko product token allows products that embed the Gecko engine, including Mozilla, to identify this significant sub-product.
|GeckoDate||Date in the format YYYYMMDD. For official Mozilla builds, this will correspond to the date portion of the BuildID. For branded versions of Mozilla, the GeckoDate should correspond to the date the code was pulled from mozilla.org, and may not necessarily correspond to the date portion of the generated BuildID. Note that the date does not identify the Gecko version if multiple branches are releasing in parallel.|
|ApplicationProductToken, Application Comment||For use by applications that embed Gecko layout engine. The form of their product token and comment is not specified here, but should adhere to the HTTP standards.|
|( VendorProductToken | VendorComment )||Product tokens for applications based on Mozilla. Format and content shall be vendor-specific, but should adhere to the HTTP standards and ideally include a GeckoVersion as described above.|
| ||Zero or more of the following token are allowed.|
| ||Zero or one of the following token are allowed.|
|A mozilla.org release|| |
|A branded release based on the same codebase as the browser above|| |
|A re-branded release|| |
|A Gecko-based browser|| |
Implementation notes for applications, vendors, and extensions
Starting with Mozilla 1.8 beta2, the best way for applications, vendors, and extensions (if needed) to add to default preferences to add
VendorComments is to add a default preference of the form
general.useragent.extra.identifier. All of the
general.useragent.extra.* preferences will have their string values added to the User-Agent string in alphabetical order by identifier. For example:
pref("general.useragent.extra.megabrowser", "MegaCorpBrowser/1.0 (MegaCorp, Inc.)");