meds
meds

Reputation: 22956

Running a (mobile) web app in a disconnected state?

Say I have a mobile web app written using JQuery Mobile, this app retrieves data from a database to populate a variety of lists and other UI elements in a single webpage, but multiple pages as defined in JQuery Mobile.

After retrieving this data and populating all the lists the user is allowed to enter and remove information, such as adding items to lists, modifying entries, so on and so forth. These updates must be pushed back to the server.

My question is, if say the system is disconnected from a connection to the website, would it be safe to assume that if we keep checking for a resumed connection (through Ajax) that the mobile browser will remember all the information added and modified in the lists (as it was all done in java?). Is there an upwards limit to how many form elements a browser can support and it may start 'forgetting' values it has set so by the time it reconnects to the main server it won't know what changes to send to it?

Upvotes: 1

Views: 406

Answers (2)

Babak Naffas
Babak Naffas

Reputation: 12561

If you're using HTML5, you could use the local storage mechanism until your connection to the service is restored.

Upvotes: 2

David B.
David B.

Reputation: 314

Sounds like you should be storing that information in Cookies and then when a connection is again achieved match the Cookies to the information in database and if there is a difference store the Cookies in the database.

Upvotes: 0

Related Questions