Learn Measure Blog Live About

Current page does not respond with a 200 when offline

Appears in: PWA audits

Progressive Web Apps (PWAs) must work offline. To determine whether a page is accessible while the user is offline, Lighthouse checks that the page sends an HTTP 200 response, which indicates that the request for the page was successful.

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 a 200 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.

Each PWA audit is weighted equally in the Lighthouse PWA Score, except for three manual audits: Site works cross-browser, Page transitions don't feel like they block on the network, and Each page has a URL. Learn more in the Lighthouse Scoring Guide.

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.

Try it! Learn how to add a service worker to your app with the Working with service workers codelab.


Last updated: Improve article


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