Skip to content

local storage Use

twitter logo Updated on ・1 min read  

Hello dev,
I am making an application using Angular 6 and laravel and I need help for store session data and I read to many articles and Most of articles suggest LocalStorage.
I want to know, is it good to store data like session data or I need to use something else?

Thank you

twitter logo DISCUSS (6)
markdown guide

May I suggest indexdb via pouchdb framework. Please consider reading this excellent post on the subject.

Article: Linky



Been in your shoes, only difference, I wasn't brave enough to ask. That post should help you weigh it up. I have sebtled on encrypted user data stored in index dB but making sure it invalidates on browser close. Anything else like names and credit cards I'd store in Couch server side then sync.

Can I use local-storage to use usernames.
I also heard session storage kind of thing in JavaScript.
Anyways thank you


Are the user names email addresses?

by allowing usernames to be stored, you make the attackers job easier by doing 50% of the work for them. however, if when you auth, you have 3 credentials. username, date of birth (dont use this its easy to get DOB) and password then you could store usernames with no real impact?

Classic DEV Post from Dec 11 '19

If you work as a dev for a product team, what's it like?

AjayMalhotra profile image
Experienced Full Stack Developer, blogger and youtuber. Blog: Youtube:

Sore eyes? now has dark mode.

Go to the "misc" section of your settings and select night theme ❤️