Skip to content
Advertisement

PWA Building Best Practices: Determinsitic Updates Android

I just built my first PWA from an existing website, using PWABUILDER and not able to figure out how to handle updates after installs. Currently only deterministic way of updating the PWA, is by uninstall & reinstalling.

As per web.dev, it’s very ambiguous:

  1. Chrome Android checks every 24 hour to seek a copy of manifest
  2. if there is a change in manifest, it queues the manifest and then several conditions a) all PWA windows are closed, b) Device is plugged in, c) connected to WIFI, chrome requests for the updated manifest.
  3. if the above fails, it may increase the time between checks to 30 days!

What is the right way to keep a PWA updated?

Ref:

Updates on Chrome for Android #

When the PWA is launched, Chrome determines the last time the local manifest was checked for changes. If the manifest hasn’t been checked in the last 24 hours, Chrome will schedule a network request for the manifest, then compare it against the local copy.

If select properties in the manifest have changed (see list below), Chrome queues the new manifest, and after all windows of the PWA have been closed, the device is plugged in, and connected to WiFi, Chrome requests an updated WebAPK from the server. Once updated, all fields from the new manifest are used.

If Chrome is unable to get an updated manifest from the server, it may increase the time between checks to 30 days.

Advertisement

Answer

PWA updates on macos chrome happens moment the Web app or browser is opened.

On android, it still works, but requires at least two opens.

IOS is just about uninstall and install, as what is been observed.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement