← Back to release summary

More accurate offline capability detection for PWA sites before showing install prompt

Category
Miscellaneous
Type
No developer-visible change
Status
Enabled by default (Chrome Enabled by default)
Intent stage
Prepare to ship

WPT details: it's not a feature that can be tested by WPT.

Summary

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.

Standards & signals

Ecosystem

Samples: https://pwa-sample-cds.glitch.me/ https://pwa-sample-cds-no-offline-support.glitch.me/

View on chromestatus.com