PhoneGap: Offline App Use

948 views Asked by At

I'm currently developing an app using PhoneGap. What I currently have is my app pulls info from online, such as tweets from a certain user account, and displays a feed on one of the pages.

I want to have this page available for offline use if the user is not connected to the Internet, but it would update the twitter feed the next time they're connected. What would be the best method to achieve this functionality?

1

There are 1 answers

0
Glorfindel On BEST ANSWER

You can use the localStorage of the browser - it can handle all kinds of data, as long as it is not more than ±10MB. PhoneGap has some documentation about this. Because this is a HTML5 feature, you can test/debug this in your desktop browser as well (this is generally easier than debugging the PhoneGap app itself).

There are other options such as a SQLite plugin but this is probably too heavy for your intended use. An overview of more available options can be found here.