Stay organized with collections
Save and categorize content based on your preferences.
With all of this work we've been doing outside of the window, you might think that Cache instances can only be accessed in the service worker scope. The fact is that you can access Cache instances in both the service worker scope and in your web app's traditional code, running in the window. This makes it easier for the user to directly interact with a service worker cache, or update the user interface based on cache state.
One potential use case is to offer a "save for offline" feature for pages the user may want to read later, but know they may be offline at that time.
This isn't the only use case for working with Cache instances in the window. For example, you could predictively prefetch and cache assets you know the user will need to perform a specific action. This would reduce or avoid the latency of downloading those assets on demand.
There are other potentially beneficial use cases—and, since you can interact with Cache instances in the absence of a service worker, not all of them may require one to be installed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-12-07 UTC."],[],[],null,[]]