Current page responds with a 200 when offline

Progressive web apps must work offline. Lighthouse checks whether a page sends an HTTP 200 response to tell if the page is accessible while the user is offline.

Learn more in What is network reliability and how do you measure it? Lighthouse flags when the page doesn't respond with a 200 when offline:

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

How this audit fails

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

Each PWA audit is weighted equally in the Lighthouse PWA Score, with the exception of three manual audits: Site works cross-browser, Page transitions don't feel like they block on the network, Each page has a URL. Learn more in The Progressive Web App score.

Recommendations

  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.

Codelabs

See it in action
Learn more and put this guide into action.

The codelab above shows some basics about how to debug a service worker using Chrome DevTools. For more detailed help, see the Debugging Service Workers codelab.

More information

Page doesn't respond with 200 when offline audit source

Last updated: Improve article