localStorage, sessionStorage, and IndexedDB
The three main client-side storage APIs, ranging from simple synchronous key-value storage to a full asynchronous, transactional database in the browser.
Beyond cookies, browsers offer three progressively more capable client-side storage mechanisms, and choosing among them depends heavily on how much data you need to store, whether it needs structure beyond simple strings, and whether synchronous access is acceptable. Interviewers ask about this trio to see whether you know when a simple key-value store is enough versus when you actually need a real embedded database.
localStorage is like a small notepad in your pocket — quick to jot a note on, but limited in space and only holds plain text. IndexedDB is like an actual filing room with labeled cabinets, folders, and a card-catalog index system for finding files by any attribute, capable of holding vastly more material, but requiring a bit more setup to use properly.