Local Storage in the browser

Posted by Joe Enos on May 14, 2021 · 1 min read

Local storage lets you store things indefinitely in the user's browser, specific to your site. This can be used for all kinds of things, like caching dropdown values, storing user information, keeping client-side shopping carts, whatever else you can think of. It's a simple store, just string-value pairs, so if this doesn't suit your needs, check out the much more powerful and more complex IndexedDB.

View code on GitHub