I have a webpage that has some fields. When the fields are filled out, it has a submit button to upload to the server. When the person is offline and fills out the fields, is there a way to save the page to the local drive and then upload when they are back in network? They can’t access the server when they are out of the office, so aside from just leaving a bunch of tabs open, is there a way to save the page and then upload at a later time?
I tried the save functions but it saves the page without saving the new data in the fields. The fields exsit inside of a
and the current JS is not done by me. So I will have to add on to what is already there.
2
Answers
I ended up cloneing the page with the fields and then making that a download. I couldn't save becuase of security restricktions, so I set an anchor element and downloaded the file. Thank you to everyone who helped
First pic of code
Second pic of code
Yes, it is possible to save data to the browser’s local storage.
See: Using the Web Storage API