Chapter 10

Storing User Data in the Browser

IN THIS CHAPTER

Bullet Getting the hang of the Web Storage API

Bullet Taking your first look at JSON

Bullet Adding stuff to storage

Bullet Getting stuff from storage

Bullet Removing stuff from storage

Data is like garbage. You’d better know what you are going to do with it before you collect it.

—ANONYMOUS

One of the hallmarks of a bigtime website is that most of what you as a site visitor see is data that has been retrieved from a server. This data has been created and managed by a database specialist, and the code that asks for the required data and then returns that data to the web browser is created by a back-end web developer.

Programming the back end is the subject of Book 4, but not every web page that works with data needs back-end coding. For example, suppose your web page enables each user to set custom background and text colors. Setting up a complex back-end edifice to store those two pieces of data would be like building the Taj Mahal to store a few towels. ...

Get Web Coding & Development All-in-One For Dummies, 2nd Edition 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.