Question

I've built a web-app to run on an iPad, effectively functioning as a kiosk. The app collects basic data like Name, Address and Email. This is then sent to a remote MySQL database.

Is there any way I can safeguard the entries in the event that WiFi/3G connectivity drops? For example, failed submissions could be stored in an array or localStorage until a connection is re-established.

Does this sound feasible?

Was it helpful?

Solution

I found that this was an overcomplicated way of solving a simple problem. I'm now saving JSON strings to localStorage and pushing those those to the live server every n seconds. Check for window.navigator.online; if the AJAX request succeeds then localStorage records are erased.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top