String
Mandatory Yes Example
"version": "0.1"
The version string for the extension.
Version formatThe version string consists of 1 to 4 numbers separated by dots, for example, 1.2.3.4
. Non-zero numbers must not include a leading zero. For example, 2.01
is not allowed; however, 0.2
, 2.0.1
, and 2.10
are allowed.
Extension stores and browsers may enforce or warn if the version string doesn't comply with this format. They may also apply restrictions to the range of numbers available. For example:
^(0|[1-9][0-9]{0,8})([.](0|[1-9][0-9]{0,8})){0,3}$
. Also, from Firefox 108, a warning is provided if an extension is installed with a version number that doesn't match this format.It may be possible to create an extension that appears to have a valid version number when run in a browser but doesn't comply with store requirements. Particular care should be taken when developing cross-browser extensions that use large number elements.
Some browsers and web stores may recognize the version_name key. This key enables you to provide a descriptive version string that may be displayed instead of the version number. For example, 1.0 beta
.
To determine which of two extension versions is the most recent, the version string numbers are compared left to right. A missing version string element is equivalent to 0
. For example, 1.0 is equivalent to 1.0.0.0. The first version string with a number greater than the corresponding number in the other version string is the most recent. For example, 1.10 is a more recent version than 1.9.
See Legacy version formats for details of previously supported version strings.
Access the version number in codeYou obtain the extension version in your JavaScript code using:
console.log(browser.runtime.getManifest().version);
If the manifest contains:
You see this in the console log:
"0.1"Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4