I have a page where a user is filling out a very large multi-page form. I'm using garlic.js to persist data into localstorage on the event of a crash or misclick of closing the browser.
What's the easiest way I can go about getting the user back to the last page they were filling out after logging back in, in the event of a crash or browser closing?
Can I use localStorage for this or cookies? Fairly new to javascript so the simplest solution would be appreciated!
In case your page does not have any pre-requisites, you can follow below steps:
Now the browser crash accidentally and you reopen your application. From the localStorage -
What you could do:
Keep saving the data in localStorage every input
If for whatever reason the user browser crash and the client is disconnected, when he comes back, let him log back in, and let him access a new form.
On a new form, check if previous data exists, if so fill the inputs, if not it means that it's his first time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.