I have a long html form and I want to prevent that a user accidentally loses all inputs.
In Chrome, I can close the tab and restore it without losing any input. However, if I reload the page (F5) all input fields are cleared.
In Firefox, I can reload the page (F5) without losing any input. However if close the tab and restore it all input fields are cleared.
I was thinking of an Ajax or localStorage solution, so I can constantly save the current input and restore it if needed, but I was hoping for some HTML5 setting (without javascript), to tell the browser that I want to keep the input after reloading.
While the opposite (delete everything on refresh) seems easy (autocomplete="off") I had no luck using autocomplete="on"
Note: this is all before clicking the submit button. After the user clicked on the submit button it does not matter whether the inputs are still there or not.
EDIT: all the other questions propose using javascript/localStorage. I can solve the problem using javascript but I am asking if there is an easier way, like a HTML5 setting to let the browser handle it.