0

during these days i read about localStorage and cookies. I discover that the common opinion about this feature is that his use could be dangerous and you have to use it wisely(it's hackable).

Why?

To understand why i read this

Question

Now my question is why we have to use localstorage?(if we know that is hackable)

There is a correct use of it ?

Where are the real positive point about this new feature(instead of using a server or a cookie that looks like safer)?

Legeo
  • 784
  • 4
  • 20
  • 44
  • 1
    You don't *have* to use it at all. It just allows you to store some data in the user's browser, without the baggage of using cookies for that. What you use that for is up to you, and you should certainly not treat it as *secure* storage (like basically anything client-side). What comes to mind easily is a local cache of a large public data file. – deceze Oct 01 '18 at 09:15
  • Hey Thanks for this comment. Yeah i understand it. I was askin to my self if it was some right use of it that i didn't see (i'm new to javascript). And why this voice exists at this point. – Legeo Oct 01 '18 at 09:19

0 Answers0