This recipe will teach you how to save and read values from the
localStorage system. We're going to build a simple application for saving and reading a selected language as an internal preference. Actually, we'll ask the user to select one value for language and it will be stored in a property called
lang. This property could be useful for deciding which other values should be used. In fact, the mentioned property helps us to choose and set another property in
sessionStorage as you can learn in the next recipe of this chapter.
Obviously, you can store different properties in
localStorage. This storage system can work as a central place for storing user's preferences avoiding the use of a local SQL-based database. ...