Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Latest commit

 

History

History
57 lines (44 loc) · 2.02 KB

File metadata and controls

57 lines (44 loc) · 2.02 KB
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.

How the Lighthouse Application Cache audit fails

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' %}

Use the Cache API instead of the Application Cache

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.

Resources