You need to do something on the client machine. Once the HTML has finished loading on the client machine, the connection is severed.
Use Javascript and a Javascript timer, then gather up the form information and send it using the Javascript XMLHttpRequest object to send the information to the server. Be sure to save the information as a “draft” rather than live data.
I have left out all sorts of plumbing, but a search for XMLHttpRequest should fill it in.
Now you can say that you are using AJAX 🙂