Extensions/MiseA Jour

Le système de mise à jour automatique

Firefox a un système de mise à jour automatique. Régulièrement, il va vérifier qu'il n'existe pas de nouvelles versions pour les extensions installées. Il va alors récuperer le fichier update.rdf qui est indiqué dans la balise <em:updateURL>. Avec le contenu de ce fichier, il peut savoir si il existe une mise à jour ou pas.

Si la balise <em:updateURL> n'est pas présente, ce qui est le cas pour les extensions hébergées sur httphttp://addons.mozilla.org, il va interroger le site httphttp://addons.mozilla.org pour connaître les mises à jour dispo.

Le fichier update.rdf

Exemple de fichier update.rdf

Pour Firefox 0.9 et Thunderbird 0.7

 <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <RDF:Description RDF:about="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}">
    <em:version>2.3</em:version>
    <em:updateLink>http://www.mysite.com/fooextension2.3.xpi</em:updateLink>
  </RDF:Description>
 </RDF:RDF>

Pour Firefox 1.0PR et Thunderbird 0.8

Le fichier update.rdf peut contenir des informations supplémentaires.

 <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:em="http://www.mozilla.org/2004/em-rdf#">

  <RDF:Description RDF:about="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}">
    <em:updates>
      <!-- liste des mises à jour disponibles  -->
      <RDF:Seq>
        <RDF:li RDF:resource="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}:2.2"/>
        <RDF:li RDF:resource="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}:2.3"/>
      </RDF:Seq>
    </em:updates>

    <!-- les 2 balises suivantes sont optionnelles. Elles ne sont là que pour la
         compatibilité avec Firefox 0.9, dans le cas où votre extension est
         compatible avec Firefox 0.9 -->
    <em:version>2.3</em:version>
    <em:updateLink>http://www.mysite.com/fooextension2.3.xpi</em:updateLink>
  </RDF:Description>

  <!-- This Description describes updates available to version 2.2 of
          FooExtension - it defines a new maxVersion for the Firefox
          targetApplication (format of the targetApplication object is the
          same as for the install.rdf file, with the exception of the
          em:updateLink property, which contains a URL to the updated XPI) -->
  <RDF:Description RDF:about="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}:2.2">
    <em:version>2.2</em:version>
    <em:targetApplication>
      <RDF:Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>0.9</em:minVersion>
        <em:maxVersion>1.0</em:maxVersion>
        <em:updateLink>http://www.mysite.com/fooextension2.2.xpi</em:updateLink>
      </RDF:Description>
    </em:targetApplication>
  </RDF:Description>

  <!-- This Description describes updates available to version 2.3 of
          FooExtension - (format of the targetApplication object is the
          same as for the install.rdf file, with the exception of the
          em:updateLink property, which contains a URL to the updated XPI) -->
  <RDF:Description RDF:about="urn:mozilla:extension:{8be6949b-76b9-4da7-b453-b5f69a11c76e}:2.3">
    <em:version>2.3</em:version>
    <em:targetApplication>
      <RDF:Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.0</em:minVersion>
        <em:maxVersion>1.0</em:maxVersion>
        <em:updateLink>http://www.mysite.com/fooextension2.3.xpi</em:updateLink>
      </RDF:Description>
    </em:targetApplication>
  </RDF:Description>

 </RDF:RDF>

Dernière modification le août 25, 2006 2:21 .


Le contenu de cette page est disponible selon certaines conditions de réutilisation. Lire aussi la page des informations légales.

Mozilla® est une marque déposée de la fondation Mozilla.
Mozilla.org™, Firefox™, Thunderbird™, Mozilla Suite™ et XUL™ sont des marques de la fondation Mozilla.