O'Reilly logo

HTML5 for .NET Developers: Single page web apps, JavaScript, and semantic markup by Jim Jackson II and Ian Gilman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required