FAQ: How does user script updating work?
Clone this wiki locally
User script versioning
User scripts should specify their versions using the Toolkit version format and the
@version metadata header. For example:
User script update checking
Scriptish will periodically, and upon a user's request, check for updates to installed user scripts. This is done through the
@updateURL metadata header, or the source download URL if the user has enabled the "Use download URL for updates if there is no update URL" option in the Scriptish Options window. The download URL is recorded when the user installs a script outside of Private Mode.
When a update check is performed the new
@version is compared to the old
@version. If the new
@version is greater than the old
@version an update will be performed.
Users can manually check for updates at any time through the Add-ons Manager.
Automatic updating is disabled for user scripts by default. If the user script supports integrated updates (i.e. has a valid
@updateURL), automatic updating can be configured in a user script's detailed view within the Add-ons Manager.
The frequency of automatic update checking is determined by the
extensions.update.interval preference within about:config. The default value for this preference is 24 hours.
User Interface (UI)
Scriptish integrates with the Firefox 4 Add-ons Manager, meaning the update experience will be identical to updating extensions, themes, etc.
Because AMO requires that updates be handled securely, Scriptish must either only allow updates over HTTPS with valid SSL certificates, or provide an update-signing procedure. The latter is planned but not yet implemented, so Scriptish can only offer the former method for user script updating at this time.
Opting out of secure updates
Many users have requested that secure updates be disabled, so that they will work with the popular userscripts.org which is does not have a ssl certificate. So AMO has allowed us to provide a opt-out feature, which you can toggle on/off in Scriptish's options window.
Since other user script engines have not yet supported user script updating, user script authors have had to implement their own update code. This led to many problems, ranging from inconsistent user experiences to bringing down the entire UserScripts.org website due to poorly written update code.
If you are a user script author that has implemented your own updating code, you should check that
GM_updatingEnabled exists and is equal to
true. This will allow you to take advantage of built-in support for updating your user script, providing your users with the best possible experience.