navigator.storage is the entry point for the Storage API’s StorageManager. Learn how to estimate usage and quota, check or request persistence, secure context rules, five examples, and try-it labs.
01
Kind
Read-only property
02
Returns
StorageManager
03
Baseline
Widely available
04
Context
Secure (HTTPS)
05
Quota
estimate()
06
Keep data?
persist()
Fundamentals
Introduction
Modern sites store data in IndexedDB, the Cache API, and other origin storage. Browsers give each site a limited amount of space — and may clear that data when the device is low on disk unless persistence is granted.
navigator.storage returns the singleton StorageManager for the current site. MDN: you can examine and configure persistence, and learn approximately how much more space is available.
💡
Not localStorage
localStorage / sessionStorage are separate Web Storage APIs. navigator.storage is about origin storage management (quota + persistence), not a key/value map.
Concept
Understanding the storage Property
Think of navigator.storage as a storage dashboard for your origin: how much you use, how much you may use, and whether data is marked persistent.
StorageManager — singleton returned by the property.
estimate() — Promise with approximate usage and quota (bytes).
persisted() — Promise resolving to whether persistence is already granted.
persist() — request persistent storage (browser decides / may prompt).
getDirectory() — access the origin private file system (OPFS) when supported.
Secure context — HTTPS / localhost required.
Foundation
📝 Syntax
General form of the property:
JavaScript
navigator.storage
Value
A StorageManager object for the current site / app.
Examples follow MDN navigator.storage / StorageManager patterns. Prefer Try It Yourself on HTTPS — numbers are approximate and differ by browser and origin.
StorageManager available
(or "StorageManager missing" on unsupported / insecure pages)
How It Works
On modern HTTPS browsers this is usually available. Still feature-detect for older engines.
Example 2 — Secure Context Check
StorageManager requires HTTPS / localhost.
JavaScript
console.log("secure: " + window.isSecureContext);
console.log("storage: " + Boolean(navigator.storage));
if (!window.isSecureContext) {
console.log("Serve over HTTPS to use navigator.storage");
} else if (!navigator.storage) {
console.log("Secure, but StorageManager not exposed");
} else {
console.log("Ready to call estimate / persist");
}
navigator.storage is Baseline Widely available across modern browsers (MDN: since December 2021). It requires a secure context (HTTPS / localhost). Always feature-detect methods such as estimate and persist.
✓ Baseline · Widely available
Navigator.storage
StorageManager entry point — estimate origin quota and request persistence for offline / PWA data.
UniversalWidely available
Google ChromeStorageManager · Desktop & Mobile
Full support
Mozilla FirefoxStorageManager · Desktop & Mobile
Full support
Apple SafariStorageManager · macOS & iOS
Full support
Microsoft EdgeStorageManager · Chromium
Full support
OperaStorageManager · Modern versions
Full support
Internet ExplorerNo StorageManager support
Unavailable
storageExcellent
Bottom line: Feature-detect navigator.storage, call estimate() for UX, and use persist() when durable offline data matters.
Wrap Up
Conclusion
navigator.storage is the Baseline entry point to StorageManager. Feature-detect it, stay on HTTPS, use estimate() for approximate quota, and persist() / persisted() when you need stronger durability for offline data.
Baseline StorageManager — estimate quota, request persistence, stay on HTTPS.
5
Core concepts
📄01
Returns
StorageManager
Value
📊02
Quota
estimate()
API
💾03
Keep
persist()
Durability
🔒04
HTTPS
required
Security
🎯05
Not
localStorage
Clarify
❓ Frequently Asked Questions
It is a read-only Navigator property that returns the singleton StorageManager for the current site — used to estimate storage usage/quota and manage persistence of data stores.
No. MDN marks it Baseline Widely available (since December 2021). It is not Deprecated, Experimental, or Non-standard.
Yes. It is available only in secure contexts (HTTPS or localhost) in supporting browsers.
navigator.storage.estimate() returns a Promise that resolves to an object with usage and quota numbers (bytes) for your origin — approximate room left for local storage.
persisted() checks whether persistence is already granted. persist() requests that the browser keep your site’s storage when possible (may return true/false depending on browser heuristics and permission).
No. localStorage / sessionStorage are Web Storage key-value APIs. navigator.storage is the Storage API’s StorageManager for quota estimates and persistence across origin storage (IndexedDB, Cache, etc.).
Did you know?
StorageManager.getDirectory() opens the origin private file system (OPFS) — a sandboxed folder for your site. That is separate from showing a user file picker with <input type="file">.