The Local Archive: LocalStorage vs IndexedDB vs Cookies
The modern browser is a full-fledged database hub. Choosing the right storage engine is critical for application performance and privacy.
Cookies: The Network Bridge
Small (4KB), sent with every HTTP request. Use these ONLY for authentication tokens. Storing UI state in cookies slows down every network call.
LocalStorage: The Simple Key-Value
Capacities around 5MB, synchronous, and easy to use. Perfect for "Dark Mode" preferences and small user settings. Avoid it for large data, as its synchronous nature can block the UI thread.
IndexedDB: The Industrial Solution
A full, asynchronous, indexed database inside your browser. It has virtually no size limit and is the foundation for "Offline First" applications and complex dev utilities.
Use our Storage Audit tools to see what sites are storing on your machine and how to clear your local workspace safely.