0

I develop an application with PhoneGap and JQM (for iOS and Android). I would like to store some parameters such as: language, is the user logged in?, etc.

What is the best way to store these data?

I heard about LocalStorage but it seems it is not persistent. I also heard about file but it should be heavy for this kind of use. My app will also have some data in cache and I'll probably use PouchDb or SQLite but can I use these solutions to store parameters in my app? I don't have the feeling it is convenient for that.

Thank you.

DescampsAu
  • 910
  • 1
  • 9
  • 23

1 Answers1

1

In case you want to have user data with possibility for those users to be logged in and out, and since you are gonna use database anyway for your project, you should absolutely use that to store the information. The files are okay for that purpose too, if you don't want to use database (which actually are files on disk anyway). What I've read & heard localStorage isn't the most efficient solution to store data (at least when more data is stored).

Roope Hakulinen
  • 6,781
  • 4
  • 37
  • 63
  • Ok. Then I will use PouchDB for my data (high amount of data with a well defined structure) and for my parameters (as PouchDB is no SQL I guess it can be used to store non structured data. – DescampsAu Dec 30 '14 at 09:22