jargon

Comparison

IndexedDBvslocalStorage

IndexedDB

you needed to keep megabytes of structured data on the device, so key-value strings were not enough.

An asynchronous, transactional, indexed object store with a much larger quota than web storage and support for structured values including blobs. It is the only real option for offline data and large client-side caches. Its native API is famously unpleasant, which is why nearly everyone uses a thin wrapper over it.

Full entry →

localStorage

you saved the preference and it was still there a week later, on that browser only.

A synchronous key-value store of strings, scoped to the origin, with no expiry. It is convenient and it is synchronous on the main thread, which means a large read blocks rendering. It is readable by any script on the origin, so nothing sensitive belongs in it, and the accessor itself throws in some privacy modes, so every access needs wrapping.

Full entry →

Related comparisons