Summary

Cookies can be used creatively to personalize a web site for visitors. The cookie information is not stored on a server, but rather on the user’s hard drive; it represents the one thing that can be written to a user’s disk from client-side scripts.

The designer’s goal with cookies is to create a personalized environment for the user so that he will return to the site and keep using it. Cookies can be updated for changes in the site or the user’s preferences. In the next several chapters, you will see how to store user information using server-side scripts and databases that are far more sophisticated and robust than cookies but that are used in a very similar way to cookies.

Get JavaScript Design 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.