Local Storage in the browser

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s