demo · v144

Budget Planner

Now that navigator.storage.estimate() reports a stable per-origin quota, you can plan against it. Set how much you intend to spend on cached HTTP responses, IndexedDB rows, OPFS files, and media blobs — the planner reads your real quota and tells you what fits, what to evict, and at what point the API would fail.

StorageManager.estimate: checking…

live quota: used:
budget total: 0

the API

const { quota, usage } = await navigator.storage.estimate();
// Chrome 144: quota is per-origin and predictable.
// Older Chrome: quota drifted as disk pressure changed.

const free = quota - usage;
if (free < planned) showFallbackStorageUI();

see also