views:

238

answers:

1

Hi and thanks in advance,

I'm working on a phonegap iPhone app which downloads content from the network in the form of HTML docs with text, images, and embeded HTML5 videos.

I want to download these documents as they're available and store them locally, for further reading in offline mode. I've searched a bit and found that the optimal place to store this kind of data would be in the app's Documents folder. However, I don't really know how to access it with the Phonegap API.

I know how to create an XHTML file from js, but how do I read/write files from/to my own app's Documents folder?

Thanks again.

+1  A: 

you can store the in the sqlite database provided by the browser.

http://developer.apple.com/safari/library/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/UsingtheJavascriptDatabase/UsingtheJavascriptDatabase.html

Aaron Saunders
A whole XHTML page on a database field?
StJimmy
You can use the file io. http://phonegap.pbworks.com/JavaScript-API#file But some people have mentioned better performance with the database
Aaron Saunders
Thanks a lot for both links. They were vere helpful.
StJimmy