Current page does not respond with a 200 when offline

The Core Progressive Web App checklist says that a PWA should provide a custom offline page. The Optimial Progressive Web App checklist says that a PWA should provide an offline experience where the PWA works the same offline as it does online (wherever network connectivity isn't strictly required).

Learn more in the What is network reliability and how do you measure it? post.

How the Lighthouse offline audit fails

Lighthouse flags pages that don't respond with an HTTP 200 response when offline:

Lighthouse audit showing page doesn't respond with a 200 when offline

Lighthouse emulates an offline connection using the Chrome Remote Debugging Protocol and then attempts to retrieve the page using XMLHttpRequest.

How to make your PWA work offline

  1. Add a service worker to your app.
  2. Use the service worker to cache files locally.
  3. When offline, use the service worker as a network proxy to return the locally cached version of the file.

Resources