On the Web, there are two places to store information: on the web server, or on the web client (the viewer’s computer). Certain types of data belong on one, while others work better on the other.
The web server is the place to store sensitive information and data you don’t want people tampering with. For example, if you fill your shopping cart at an online bookstore, your potential purchases are stored on the web server. The only data your computer keeps is a tiny bit of tracking information that tells the website who you are (so it knows which shopping cart is yours). Even with HTML5, there’s no reason to change this setup—it’s safe, secure, and efficient.
But server-side storage isn’t the best bet for every website. Sometimes, it’s easier to keep nonessential information on the web surfer’s computer. For example, local storage makes sense for user preferences (for example, settings that influence how the web page tailors its display) and application state (a snapshot of where the web application is right now, so the web visitor can pick up at the same spot later on).