Hello everyone,
Does anyone know what is the difference between Storage and LocalStorage of Ionic2 ? I am not very clear when reading it. Please kindly explain me.
Thanks in advance.
There is a nice short description at the Ionic documentation
Basically localStorage is a browser owned key/value system. You can store up to 5Mb depending on the platform. However the OS you are running your app under can decide to delete its content if your app is on the background and OS needs memory.
The Storage plugin will try to use permanent storage such SQLite. Therefore your data lives as long as your app is installed.
So details that need to be persisted such as first launch flag or authentication token and so on, need to go under Storage, where you can decide to store some recurrent data you get from the server at localStorage..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With