Skip to content

Persistent Storage

Persistent Storagenavigator.storage.persist() asks the browser to protect stored data (IndexedDB, Cache API, service worker caches) from automatic eviction. Without persistence, the browser may clear site data under storage pressure.

if (navigator.storage && navigator.storage.persist) {
const isPersisted = await navigator.storage.persist();
console.log(isPersisted ? 'Storage is persistent' : 'Storage may be evicted');
}
  • Returns a Promise<boolean>true if the browser granted persistent storage.
  • The browser may reject the request based on its own heuristics (e.g., user engagement). There is no guaranteed way to force persistence.
  • navigator.storage.persisted() checks whether storage is already persistent without requesting it.
Browser / PlatformSupportSinceConfidenceSourceNotes
Chrome (Desktop)✅ yes55highref
Chrome (Android)✅ yes55highref
Edge (Desktop)✅ yes79highref
Firefox (Desktop)✅ yes57highref
Firefox (Android)✅ yes57highref
Safari (macOS)✅ yes15.2highref
Safari (iOS)✅ yes15.2highref
Samsung Internet✅ yes6.0mediumref

Source: spec · MDN · Last verified 2026-07-12 · Confidence: high

← Back to the Compatibility explorer.