Andrew Samuelsen
Andrew Samuelsen

Reputation: 5432

Html5 offline cache form data

Hi I'm designed a web app to be used offline at my company. People will be walking around the warehouse with iPads offline enter some pretty simple form data, usually 15-20 char id codes and quantities associated with them. What is a good way to store this info while offline and then upload to db when connected?

I was thinking using JavaScript to check for a connection. If none, then append data to an array. If there is a connection, append then upload whole array then clear it.

Can you give me some ideas for best practices, like how to not lose data, prevent data loss should the web app be accidentally closed, etc.? Thanks

Upvotes: 3

Views: 1597

Answers (1)

Caimen
Caimen

Reputation: 2619

Maybe try localstorage any IPad should support it.

http://diveintohtml5.ep.io/storage.html

The user should never lose the data unless they clear browser cache or you as a programmer overwrites it. It is stored by domain.

Upvotes: 2

Related Questions