What is the main Difference between local storage vs cookies?
Can you explain with example:
For further actions, you may consider blocking this person and/or reporting abuse
What is the main Difference between local storage vs cookies?
Can you explain with example:
For further actions, you may consider blocking this person and/or reporting abuse
Free and easy to use APIs for your next project, learning a new technology, or building a new feature.
Chris -
Ben Halpern -
Ben Halpern -
Avi Avinav -
Once suspended, 10secondsofcode will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, 10secondsofcode will be able to comment and publish posts again.
Once unpublished, all posts by 10secondsofcode will become hidden and only accessible to themselves.
If 10secondsofcode is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to Elango Sundar.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community 👩💻👨💻 safe. Here is what you can do to flag 10secondsofcode:
Unflagging 10secondsofcode will restore default visibility to their posts.
Top comments (4)
A cookie is basically just information (a string) in the HTTP header. It can therefore be modified on client and server side.
The local/session storage is a key/value store in your browser and can therefore only be access on the client-side.
On a note, no one should be putting sensitive data in the Local Storage. This includes session IDs and JWTs. They are vulnerable if there is ANY possible XSS vulnerabilities, and while SQL Injection attacks today are mostly because of old tech, we are still finding XSS vulnerabilities.
I think this is true for every client side storage. It doesn't matter if it's stored in a cookie, indexdb or local storage. Tari is right. Never store sensitive data in such a storage.
Hope this helps
stackoverflow.com/questions/322066...