Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Latest commit

 

History

History

strategy-cache-only

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cache only

The recipe provides a service worker always answering from cache on fetch events.

Difficulty

Beginner

Use Case

For a given version of your site, you have static content that never changes such as the shell around the content.

Solution

Add static content during the installation of the service worker and use the cache to retrieve it whether the network is available or not.

Category

Caching strategies