Chapter 15. Local data with web storage

So far, you’ve learned how to take advantage of a wide array of tools to produce applications that are aesthetically appealing, responsive, and fast. However, your primary means of data storage has been confined to sending information back to the server, which requires the application to wait for a round-trip to occur.

To minimize the cost of relying entirely on server-side persistence, most modern browsers now support web storage (also known as DOM storage), a relatively new feature that enables storing small amounts of user data on the client machine.

This chapter begins with an overview of the two storage mechanisms (localStorage and sessionStorage) and how they can make dramatic improvements in how user ...

Get Training Guide: Programming in HTML5 with JavaScript and CSS3 now with O’Reilly online learning.

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