开发者

How to queue ajax posted form data when connection is down

I have a kiosk web page that users use to sign in at an event.

On the page there is a form with a name and email input.

To prevent slow responses due to connection problems I have set up the ui to send asynchronous ajax posts.

The problem is that the connection may not be available, but I don't want to lose the data that was submitted (if the browser was accidentally closed for example). What is a way to go about saving the form data and auto retrying sending it when the connection is available?

Is this a paradigm that exists or would I have to write a full solution myself?

开发者_如何学运维

I was considering using HTML 5 persistent storage.


You could use evercookie or some of its ideas for storage

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜