layout | title | description | date | updated |
---|---|---|---|---|
layouts/doc-post.njk |
Uses Application Cache |
Learn how to migrate your web page from the deprecated Application Cache to
the Cache API.
|
2019-05-02 |
2019-08-28 |
The Application Cache, also known as AppCache, is deprecated.
Lighthouse flags pages that use the Application Cache:
{% Img src="image/tcFciHGuF3MxnTr1y5ue01OGLBn2/zOiY51J8avDQU8IkL2XG.png", alt="Lighthouse audit showing that a page uses the Application Cache", width="800", height="74" %}This audit fails when Lighthouse finds a reference to
the Application Cache manifest in a page's <html>
tag.
For example, this markup causes the audit to fail:
<html manifest="example.appcache">
...
</html>
{% Partial 'lighthouse-best-practices/scoring.njk' %}
To pass this audit, remove the manifest from your page, and use the Cache API via a service worker instead.
To migrate from the Application Cache to service workers, consider using the sw-appcache-behavior library. This library generates a service-worker-based implementation of the behavior defined in an Application Cache manifest.
See the Current page does not respond with a 200 when offline post for more information about using service workers to make your site work offline.