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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.