Reputation: 7004
I am building a hybrid app (Ionic) and only need local storage to save my database objects.
The app simply allows you to store, edit and view simple Notes.
Now, obviously I need to make sure that when the user saves a note, it remains stored on his phone.
My question is, are there any dangers of using window.localstorage
in this context? Moreover, in which cases will the user loose all its data? One obvious case is when he deletes and re installs the app.
If local storage is not the way to go, what other ways are there (or does it always require a server side solution)?
Upvotes: 3
Views: 4346
Reputation: 532
There are a few limits I found serious when using localStorage (in my case) including:
I end up looking for new candidate (sqlite seem promising but having some issue for iOS 10) On the other hand, if your application store small amount of data or mostly do transaction with online database. localStorage seems pretty good
Upvotes: 1
Reputation: 73
Local storage is indeed an easy way to store data in a Cordova app. As pointed out by JohnAndrews all the data can be lost if the user clean the application data. On top of that LocalStorage present some limitations:
If you want to have more info about data storage possibilities on Ionic (Cordova) apps check their official docs http://cordova.apache.org/docs/en/4.0.0/cordova_storage_storage.md.html
Upvotes: 3