Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Updates

This article needs a technical review. How you can help.

Firefox supports automated updates to add-ons using JSON update manifests. Add-ons hosted on AMO automatically receive updates to new versions posted there. Other add-ons must specify the location of their update manifests.

A typical update manifest looks something like:

{
  "addons": {
    "[email protected]": {
      "updates": [
        { "version": "0.1",
          "update_link": "https://example.com/addon-0.1.xpi" },
        { "version": "0.2",
          "update_link": "https://example.com/addon-0.2.xpi",
          "update_hash": "sha256:fe93c2156f05f20621df1723b0f39c8ab28cdbeec342efa95535d3abff932096" },
        { "version": "0.3",
          "update_link": "https://example.com/addon-0.3.xpi",
          "applications": {
            "gecko": { "strict_min_version": "44" } } }
      ]
    }
  }
}

Enabling updates to your extension

If your add-on is not hosted on AMO, you must specify the location of your update manifest in your add-on. For WebExtensions, add the following to your manifest:

"applications": {
  "gecko": {
    "update_url": "https://example.com/updates.json"
  }
}

For XUL add-ons, add the following to the <Description about="urn:mozilla:install-manifest"> element of your install.rdf file:

  <em:updateURL>https://example.com/updates.json</em:updateURL>

Manifest Structure

The manifest is a JSON file, with a top-level object literal. This object may have the following properties:

Property Type Description
addons object An object containing one entry for each add-on to be updated. For each such entry, the name of the property must be the add-on's ID, and the value must be an object describing the add-on and its updates.

Addon objects

addons[*]

Properties of the addons object must contain object literals, each describing an add-on to update. These objects may have the following properties:

Property Type Description
updates Array Optional An array containing zero or more update description objects for the add-on.

Update objects

addons[*].updates[*]

Update description objects must be object literals. They may have the following properties:

Property Type Description
version string The version number this update entry describes. If an update URL is specified, it must use this version. If any compatibility information is specified, it will override the compatibility information of any installed version with this version number.
update_link string Optional A link to the XPI file containing this version of the add-on. This must be an HTTPS URL, or an update_hash must be provided to verify it.
update_hash string Optional A cryptographic hash of the file pointed to by update_link. This must be provided if update_link is not a secure URL. If present, this must be a string beginning with either sha256: or sha512:, followed by the hexadecimal-encoded hash of the matching type.
update_info_url string Optional A link to an HTML file containing information about the update.
multiprocess_compatible  bool Optional
(default: true)
If false, this add-on requires compatibility shims to run in a multi-process Firefox environment.
applications object Optional

An object containing application-specific compatibility information. Each property must contain an application object, as described below.

The only application currently supported is gecko, which includes Firefox, and all other applications built on the same runtime.

If this property is omitted, support for Gecko is assumed. Otherwise, if this property is defined, it must contain a gecko property, or the update entry will be ignored.

Application objects

addons[*].updates[*].applications.gecko

Application objects specify compatibility information for a specific application. They must be object literals, and may have the following properties:

Property Type Description
strict_min_version string Optional
(default: 42.0a1)
The minimum version of the application this add-on will run on.
strict_max_version string Optional
(default: *)
The maximum version of the application this add-on will run on.
advisory_max_version  string Optional
(default: *)
The maximum version of the application this add-on is likely to run on. This property is ignored in most cases.

Document Tags and Contributors

 Contributors to this page: rolfedh, wbamberg, kmaglione
 Last updated by: rolfedh,