Persisting Data

Using localStorage to backup input fields




Using this JavaScript, every input that has a data-persist="" attribute and value will be automatically saved to a localStorage entry of the same name.

Additionally, if there is any previously saved text in localStorage from previous page loads it will pre-fill the fields will the saved data.