IndexedDB
IndexedDB is an asynchronous transactional database for structured browser data. It supports keys, indexes, and large records.
What it is
IndexedDB is an asynchronous transactional database for structured browser data. It supports keys, indexes, and large records.
Why it matters
Use it for durable local records, not as a synchronous global variable. Storage may be restricted or evicted.
Example
A chatbot stores public knowledge embeddings keyed by the model and knowledge-content hash, avoiding repeated encoding on later visits.
Technical detail
Transactions commit asynchronously. Resolve a write only on transaction completion, and handle aborts and version changes.
When to use it
Treat cache failure as recoverable, bound storage growth, and provide clear controls for any personal data you persist.
Go deeper
Sources
More in Web platform
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.