Tests whether the registered service worker can return a 200 response when it's offline by dispatching a fake fetch event to the service worker while simulating an offline environment. The install prompt will be shown only if the test passes.

Motivation

One of the expectation of installable PWA is running the web app offline. Previously, we just checked the existence of a fetch handler in the service worker. However, it was not sufficient because sometimes it can be bypassed by simple code. This change makes sure that the site can show something offline.

Demos

Specification

Editor's draft

Status in Chromium

UI>Browser>WebAppInstalls


Enabled by default (tracking bug)

Consensus & Standardization

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

  • No signal
  • No signal
  • No signal
  • No signals

Owners

Comments

Currently the new logic is used only for showing a warning message from M89. We're currently planning to start enforcing the new logic in M93.

Search tags

installability, pwa, offline, service worker,

Last updated on 2021-02-16