I am trying to cache JSON data on in localstorage to load it when there is no internet connection. It is working fine but when I restart the app I think the localstorage cle
Starting from IOS 5.1 Apple decided to make local storage a temp area. If you need persistent storage on iOS 5.1, use PhoneGap's File API. Here are a couple links to learn about the issue.
http://community.phonegap.com/nitobi/topics/phonegapbuild_localstorage_on_ios_5_1
http://docs.phonegap.com/en/2.6.0/cordova_storage_storage.md.html#Storage
Apple discurages you from using local storage as well. iOS PhoneGap app rejected because of the use of localStorage