IndexedDB QuotaExceededError — Browser Storage Limit Reached
About IndexedDB QuotaExceededError
Fix IndexedDB QuotaExceededError when web applications exceed the browser's storage quota for client-side data, causing data save failures. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: IndexedDB is a browser API for storing large amounts of structured data client-side. Storage quota is shared between IndexedDB, Cache API, localStorage, and Service Worker cache. Chrome allows up to 80% of total disk space per origin (but may evict data when disk is full). Firefox limits to 50% of disk per origin in best-effort mode; persistent storage has higher limits. QuotaExceededError fires when a write operation would exceed the storage quota. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: Application storing too much data (large files, media, cached responses) in IndexedDB. Old data not being cleaned up — entries accumulate without deletion. Device disk space is very low, reducing the available quota for all origins. Multiple features (IndexedDB, Cache API, localStorage) of the same app competing for shared quota. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: Check storage usage: navigator.storage.estimate() returns used and quota in bytes. Implement data cleanup: delete old entries, implement LRU (Least Recently Used) eviction. Request persistent storage: navigator.storage.persist() prevents browser from evicting data. Compress data before storing: use CompressionStream API or a library to reduce storage size. Move large binary data to the Cache API instead of IndexedDB for better storage efficiency. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Browser Errors collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
How much data can IndexedDB store?
Chrome: up to 80% of disk space per origin. Firefox: 50% of disk for best-effort storage, more for persistent storage. Safari: 1GB initially, prompts the user for more. The effective limit depends on available disk space.
Overview
Fix IndexedDB QuotaExceededError when web applications exceed the browser's storage quota for client-side data, causing data save failures.
Key Details
- IndexedDB is a browser API for storing large amounts of structured data client-side
- Storage quota is shared between IndexedDB, Cache API, localStorage, and Service Worker cache
- Chrome allows up to 80% of total disk space per origin (but may evict data when disk is full)
- Firefox limits to 50% of disk per origin in best-effort mode; persistent storage has higher limits
- QuotaExceededError fires when a write operation would exceed the storage quota
Common Causes
- Application storing too much data (large files, media, cached responses) in IndexedDB
- Old data not being cleaned up — entries accumulate without deletion
- Device disk space is very low, reducing the available quota for all origins
- Multiple features (IndexedDB, Cache API, localStorage) of the same app competing for shared quota
Steps
- 1Check storage usage: navigator.storage.estimate() returns used and quota in bytes
- 2Implement data cleanup: delete old entries, implement LRU (Least Recently Used) eviction
- 3Request persistent storage: navigator.storage.persist() prevents browser from evicting data
- 4Compress data before storing: use CompressionStream API or a library to reduce storage size
- 5Move large binary data to the Cache API instead of IndexedDB for better storage efficiency