Save form data and reuse it

How can I save the data of a form on a page and reuse it later? because from this page another one is opened and on return I would like to have the form data filled in as at the beginning

Use localStorage.

Var localStorage = window.storage;

localStorage. SetItem(‘key’, ‘value’ ) ;

You can save a array obj pared with Json.stringify