DEV Community

Discussion on: What is localStorage?

Collapse
 
christiankozalla profile image
Christian Kozalla

This is an excellent post on how localStorage works and use it to store data beyond simple strings with JSON.parse and JSON.stringify ❀️

With this pattern you can actually use localStorage like an in-browser NoSQL Database

I've exploited this pattern to develop a small Vuejs App allowing a user to store meals and plan which meals to cook the next week

Anyways, I meant to write a post about localStorage, but I think if I write about that app, I will just link back to this post to cover localStorage πŸ˜„

Collapse
 
tolentinoel profile image
Ellaine Tolentino

Thank you! I still don’t know much besides the basic functionalities but I would love to know more! I’ll keep an eye if you get to post more about localStorage!

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

Don't use LocalStorage anymore in apps, use IndexedDB

Collapse
 
christiankozalla profile image
Christian Kozalla

Okay, thanks for the tip.

What are the advantages of indexedDB over localStorage?

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

It is not blocking javascript I recommend watching youtu.be/NNuTV-gjlZQ

Thread Thread
 
christiankozalla profile image
Christian Kozalla

Nice, so thank you for pointing out IndexedDB, since I wasn't familiar with it. One more advantage I have found is, that it can be used with Service Workers (or Web Workers in general) πŸ‘