5

I am working on PhoneGap mobile application and I am looking into Data Storage options.

My requirements:
1) small data needs (will never exceed or get even close to 5Mb limit)
2) able to port application to all major platforms with minimal tweaks (or best, none)

It seems to me that localStorage is my only option since it is supported by all platforms.

Questions:
1) Are there any alternatives to localStorage that are working on all platforms?
2) How reliable is localStorage or how persistent localStorage is?
3) If user deletes browser's cash or similar on the phone, would my data persist? Or, what could happen that localStorage data gets lost?

Thanks

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
bobetko
  • 5,019
  • 14
  • 58
  • 85
  • I'm having the same questions. Did you find a solution for this? – Jolix Apr 02 '13 at 13:44
  • http://stackoverflow.com/questions/7750857/how-permanent-is-local-storage-on-android-and-ios The last reply on the thread states that some devices on Android 4.1 will clear the cache automatically without the user's knowledge. I'm also wondering if there's an alternative. – dk123 May 18 '13 at 03:32
  • Why don't you use local **database**? It is supported by all platforms It's persistent unless you uninstall the app. – Amol Chakane May 20 '13 at 10:13

1 Answers1

0

my advice your own minimal database with file system

http://docs.phonegap.com/en/2.5.0/cordova_file_file.md.html#FileWriter

Phd. Burak Öztürk
  • 1,727
  • 19
  • 29