Firefox Tomorrow

web api instance property

Window: caches property

View on MDN ↗

Secure context

The caches read-only property of the Window interface returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

Value

A CacheStorage object.

Examples

The following example shows how a window can retrieve cached data.

caches.open("v1").then((cache) => cache.match("/list"));

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also