Progressive web apps work offline. If Lighthouse does not receive an HTTP 200 response when accessing a page while offline, then the page is not accessible offline.
- Add a service worker to your app.
- Use the service worker to cache files locally.
- When offline, use the service worker as a network proxy to return the locally cached version of the file.
To learn how to add a service worker into an existing app, see Adding a Service Worker and Offline Into Your Web App. Use what you learn in this step-by-step, hands-on codelab to learn how to add a service worker into your own app. This covers steps 1 and 3 above.
The codelab above shows you some basics on how to debug your service worker using Chrome DevTools. For more detailed help, see the codelab dedicated to this topic, Debugging Service Workers.
Use the Offline Cookbook to determine which caching strategy fits your app best. This covers step 2 above.
Lighthouse emulates an offline connection using the Chrome Debugging Protocol,
and then attempts to retrieve the page using