0Pricing
JavaScript Academy · Lesson

The Cache API

Store and serve responses from cache.

What Is the Cache API?

The Cache API stores request/response pairs in named caches. Service workers use it to serve assets without hitting the network, which is the foundation of offline support.

The caches Object

The global caches object (a CacheStorage) manages all your named caches. It is available in both pages and service workers.

// Available globally:
// caches.open(name)
// caches.match(request)
// caches.delete(name)
// caches.keys()

All lessons in this course

  1. Registering a Service Worker
  2. The Cache API
  3. Caching Strategies
  4. Background Sync and Updates
← Back to JavaScript Academy