Persistent Storage
Persistent Storage — navigator.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.
How it works
Section titled “How it works”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>—trueif 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 & ecosystem support
Section titled “Browser & ecosystem support”| Browser / Platform | Support | Since | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop) | ✅ yes | 55 | high | ref | — |
| Chrome (Android) | ✅ yes | 55 | high | ref | — |
| Edge (Desktop) | ✅ yes | 79 | high | ref | — |
| Firefox (Desktop) | ✅ yes | 57 | high | ref | — |
| Firefox (Android) | ✅ yes | 57 | high | ref | — |
| Safari (macOS) | ✅ yes | 15.2 | high | ref | — |
| Safari (iOS) | ✅ yes | 15.2 | high | ref | — |
| Samsung Internet | ✅ yes | 6.0 | medium | ref | — |
← Back to the Compatibility explorer.