Source: Smashing Magazine, Local Storage and How to Use It
Local storage is used because you don’t have to have each user register with the site to store information. HTTP is stateless, so when the page refreshes all the information is gone.
You can store caches of data locally, so you don’t have to reload large volumes of data every time a page refreshes.
Any information you don’t want the user to be able to clear shouldn’t be kept in local storage.
Local storage can only store strings. To be stored locally, the data first has to be converted to strings with JSON.stringify(), and then it can be returned to its original form with JSON.parse().
How was local storage developed? How does locally-stored data look to developers? Can they see the information that users input locally, if it’s not accessible to the server?