>[!QUOTE] Mozilla[^source]
>IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including **files/blobs**.
- Has
- [Decent browser support](https://caniuse.com/?search=indexdb)
- [High storage limits](https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#how_much_data_can_be_stored):
- Use `navigator.storage.estimate()` JS function in a browser's dev tools to enumerate the storage limit.
- By-browser size limits:
- Firefox ([to change modes](https://support.mozilla.org/en-US/kb/storage))
- [Best effort mode](https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#does_browser-stored_data_persist): 10% total disk size
- Persistent Mode: 50% total disk size
- Chromium-based browsers:
- 60% total disk size.
- Safari
- 1 GiB, then the user is prompted to approve a higher quota.
- Uses queries on an index that produces a cursor, which you use to iterate across the result set.
- Transactional database system
- Every action performed in IndexedDB occurs within a [transaction](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Terminology#transaction)
- Getting or inserting data all happens through callbacks
- DOM events occur when a transaction completes
- JSON object-oriented database
- Referenced via key, which can be any objects supported by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)
- All requests to data are performed asynchronously
- DOM events are used to notify when results are available
- Error events cancel any transactions they're related to
[^source]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API