简体   繁体   中英

How to save page content on client with all form data as HTML file

Is there a way to save a page to HTML file, saving the client's text entered into form fields, after the page source has already been downloaded to client ? Is there a way to do this completely on the client side?

For example in Chrome, only text that was entered on document load will get saved into the HTML.

My understanding is that you're trying to cache your page on the client in the form of an HTML file. Browsers do provide your page direct access to the file system for security reasons, but they allow you access to the cookie storage. I suggest that you save your form data in cookies if you want it to be persistent between page loads from the same machine. Then on load perform a check for the cookie and if it exists load the form data from there.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM