HTML5 has an incredibly simple method for storing persisting data called
localStorage. Natively, you just call a method with key/value pair and that is saved (pretty much) forever. Knowing the key, you can retrieve it at any time. This can be used with “progressive enhancement” in mind, doing things to enhance experiences but not be required. In this screencast we’ll look at how to save the data on a form (before submission) so in case the browser window closed or the computer crashed or something, the data would not be lost.
Links from video: