Browsers offer cookies for small request state, synchronous string-based local storage, and asynchronous structured IndexedDB. The choice changes more than capacity: it changes whether data travels with requests and how JavaScript reads it.
The demo routes a data card to one of three stores. Do not put sensitive values into client storage merely because they need to persist.
When to use
Compare them when choosing where to keep session state, UI settings, or offline data.