문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top