Chapter 9. Local storage and state management

This chapter covers

  • Storing data locally in the browser
  • Retrieving stored data and restoring application state
  • Managing objects and properties using LocalStorage

Any application that handles a lot of user interaction and customization will benefit from the ability to store stateful information without the fuss and transactional support of sending it to the server and retrieving it when the user returns to the site. Consider a game site where the user wants to keep the last five highest scores. Only the highest score goes to the server for display; the rest are stored locally on the client for as long as the user wants. This reduces traffic and storage loads on the server while keeping the data ...

Get HTML5 for .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.