Register for this year’s #ChromeDevSummit happening on Nov. 11-12 in San Francisco to learn about the latest features and tools coming to the Web. Request an invite on the Chrome Dev Summit 2019 website

Responds With A 200 When Offline

Overview

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.

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.

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.

More information

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

Feedback

Was this page helpful?
Yes
What was the best thing about this page?
It helped me complete my goal(s)
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had the information I needed
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had accurate information
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was easy to read
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
Something else
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
No
What was the worst thing about this page?
It didn't help me complete my goal(s)
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was missing information I needed
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had inaccurate information
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was hard to read
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
Something else
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.