A proof of concept script for saving form data locally when connections go offline
OfflineForm is just a proof of concept, a form processing script that watches the user's Internet connection status and stores data locally whenever one goes offline.Users don't usually notice their connection's state unless they navigate to a blank Web page. And if a connection failure might happen when filling in a Web form, there are very slim chances of him noticing in time.
In the case of really big forms, or when users type really long messages within the form, finding out the Internet has disconnected might get really annoying because the user spent all that time filling in the form for nothing.
For these situations, OfflineForm can be used. The script automatically detects connection failures and instead of sending the data somewhere into the outer space of a lost Internet connection, it saves it locally via HTML5's localStorage feature.
Whenever the connection returns, previously submitted form data is sent to the server and the user's entered data (and time) is not lost.
OfflineForm supports message queues in case the user submits multiple messages using the same form and works with bad Internet connections that might go offline for various hardware reasons, or with situations where users might switch their browser's “Work Offline” option by accident.
The script is available under the MIT license on GitHub and comes with a demo for running your own tests.
Download OfflineForm from our Scripts section here.
Check out more OfflineForm screenshots here.