Most of the web sites developed today deal with data in one form or another. Naturally, this application data needs some sort of storage mechanism. As far as the server is concerned, there are sophisticated database engines such as SQL Server. However, storing data on the client side can be tricky. Traditionally, developers used cookies to persist data on the client side, but cookies suffer from their own limitations. To provide a streamlined data-storage mechanism at the client side, HTML5 provides web storage. This chapter examines what web storage is along with situations where it can be used. Specifically, you learn the following:
What is web storage?
Flavors of web storage
Storing items in, retrieving them from, and removing them from web storage
Storing non-string data in web storage
Passing data from web storage to the server for further processing