Chapter 16. Cookies

IN THIS CHAPTER

  • What Cookies Are

  • Cookie Parameters

  • Saving Cookies

  • Retrieving Cookies

  • Bill's Cookie Code

Cookies began their life in the browser world being hated by most Web designers, because they were seen as an invasion of privacy, and there was much controversy around their use. Now, no one much minds having cookies. Most users carry around dozens (if not hundreds) of cookies in their browsers and don't think twice about it. This, as it turns out, isn't a problem. Cookies can actually be very useful tools, and JavaScript's ability to both read and write cookies can be a powerful tool in your scripting toolbox.

Get Advanced JavaScript™: Insights and Innovative Techniques 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.