A
A
Alexander2015-06-19 08:44:53
JavaScript
Alexander, 2015-06-19 08:44:53

Where to store data on the client?

I am writing a hybrid application for mobile platforms on the Ionic Framework (angularjs + cordova). You need to store data on the client. For now, I save everything in localStorage, but the 5 MB limit confuses me (suddenly they are not enough). I read about WebSql, indexedDb and sqlite plugin for cordova, but I can't decide.
1) what can you advise as storage?
2) if I put the finished application with localStorage on google play, and then decide to use sqlite or indexedDB, how to make this transition with less effort and so that users do not lose their data.
ps. Application - "shopping list"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2015-06-19
@AMar4enko

What are you going to store in localStorage that you are afraid of the 5MB limit?
The transition can be made at application startup - save the version of the application to the same localStorage, check it at startup. If the version in localStorage is old, then the application has been updated - it's time to convert the data from localStorage to some other format.
Here is native SQLite
https://github.com/litehelpers/Cordova-sqlite-storage

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question