Assuming that you do not want to configure the server to store this information, you have only a few options. In particular, client-side storage. Iβll talk about localStorage as itβs easiest to use, and you mentioned it above.
Here's the localStorage API . If you think the interface is too complicated, I would recommend reading it, possibly with a tutorial (Personally, I think that Mozilla Docs should be better, but this question seems more applicable to your application).
In short, you will use the setItem(...) and getItem(...) methods.
localStorage.setItem("My test key", "My test value");
console.log(localStorage.getItem("My test key")); // --> My test value
So, for your application, I would recommend creating an object to store your values, and then adding the specified object to localStorage .
var state = {} // Get values from your form however you feel fit values = getValues(...); function setValues(values) { // Do this for all the values you want to save state.values = values // Continues for other values you want to set... } // Save values to localStorage localStorage.setItem("Application_State", state);
Now to get the state when the user returns your site.
// Application_State is null if we have not set the state before var state = localStorage.getItem("Application_State") || {}; function updateValues() { values = state.values; // Render your values to the UI however you see fit }
This is a very brief introduction here, and I would advise you to carefully read the documents on this material before publishing it on a production site.
Hope this helps && good luck!