Almost all applications involve storing data of some kind. This can be data about users, products, videos, or even page visits. Used correctly, this data can be a powerful tool in the decision-making process. That’s why companies like Google and Facebook try to collect as much data as they can about their users and their behaviors.
Web applications that handle a lot of data have traditionally used databases for storage. These databases are stored on servers that are often hundreds, if not thousands, of miles away from the user (hence the term server-side storage). An alternative option is client-side storage. Storing data on the client side means that it is stored on the user’s computer or device—the client—as opposed to being stored on a web server. In this chapter, you learn about the strengths and weaknesses of using client-side storage. You explore two new technologies that HTML5 introduces for storing data on the client side and learn how these technologies can be used in modern web applications and websites to boost performance and make websites function offline.
More pros and cons of using client-side storage are discussed in the last portion of this chapter.
Why Use Client-Side Storage?
There are many reasons why you might want to store data ...