Is browser local storage API better than cookies?

I am not a dev, but this is what I understand:

Cookies: The website (Google, Facebook, Apple...) is harvesting my info and storing it on their servers. I must always click "do not store cookies" and they will then not store it .

Local Storage: Data stays on my PC.

SessionStorage: It is here today and gone tomorrow.

Cache: It is something I can clear by pressing Ctrl+F5 when the website is broken it sometimes help.
 
I am not a dev, but this is what I understand:

Cookies: The website (Google, Facebook, Apple...) is harvesting my info and storing it on their servers. I must always click "do not store cookies" and they will then not store it .

Local Storage: Data stays on my PC.

SessionStorage: It is here today and gone tomorrow.

Cache: It is something I can clear by pressing Ctrl+F5 when the website is broken it sometimes help.
This about sums it up. There are some data and access limitations based on your particular browser.

But in general you nailed it.

As for which one to use? Depends what you want to accomplish, the size and shape of the data, and how often you'll be reading and writing to and from it.

Also, third party cookies are the evilist evils.
And no matter how much you say no. They can absolutely still store info on your machine. The browser allows the apis regardless of your choice.
 
Top
Sign up to the MyBroadband newsletter
X