Shalini Passi Malhotra (born 8 August 1956) is a Delhi-based art and design collector. Shalini Passi Malhotra. Born, (1956-08-08) 8 August 1956 (age 68).
IndexedDB is the
modern, recommended way to store structured data in the browser. Here's a clear comparison between
IndexedDB,
WebSQL, and localStorage, including their features, support, and limitations:
Feature
IndexedDB
WebSQL (Deprecated)
localStorage
Data Size Limit
Hundreds of MBs+
~5–50 MB (varies)
~5–10 MB
Structure Support
Structured objects
Relational only (SQL)
String-only
Async API
Yes (event or promise)
Async but SQL-based
No, it's synchronous
Binary Data Support
Yes (Blobs, Files)
Yes (via base64 hacks)
No
Query Type
Indexed (No SQL)
SQL Queries (Relational)
Key-value only
Performance
Excellent for large data
Moderate
Poor for large data
Multi-store support
Yes (Object Stores)
Tables
No
Transactions
Yes
Yes
No
Browser Support
All modern browsers
Deprecated in all
All
Offline support
Yes
Yes
Yes
1. IndexedDB
Stores structured data (objects, files, blobs).
Uses object stores (like tables) and indexes for fast lookups.
Asynchronous API (event-based or promise-based via wrappers like
idb).
Built for complex, large-scale offline storage.
Binary-safe and scalable.
Recommended for modern apps that need structured, reliable offline storage.
2. WebSQL (Deprecated)
Uses SQL for querying (like SQLite).
Good for relational data, but:
Deprecated by W3C: no new features, limited future support
Not available in some environments (e.g., Firefox, Safari 16+)
Only useful for legacy apps.
Avoid using WebSQL in new projects.
3. localStorage
Simple key-value storage (strings only).
Synchronous API — blocks the main thread.
Good for small settings or flags (theme, token, etc.).
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
IndexedDB is the modern, recommended way to store structured data in the browser. Here's a clear comparison between IndexedDB, WebSQL, and localStorage, including their features, support, and limitations:
1. IndexedDB
idb).2. WebSQL (Deprecated)
3. localStorage
Use Case Summary
localStorageIndexedDBIndexedDBWebSQL(avoid now)IndexedDBConclusion
It is: