Service Worker: ServiceWorkerRegistration.update() returns a promise

update() pings the server for an updated version of this Service Worker registration. This feature was shipped in milestone 45. In milestone 46, update() returns a promise that resolves with 'undefined' if the operation completed successfully or there was no update, and rejects if update failed. If the new worker ran but installation failed, the promise still resolves (same with register()).

Documentation

Specification

Editor's draft

Status in Chromium

Blink>ServiceWorker


Enabled by default (tracking bug) in:

  • Chrome for desktop release 46
  • Chrome for Android release 46

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • In development
  • Shipped
  • No public signals
  • No signals

Owner

Last updated on 2018-04-26