Chapter 23. Cookies and Creating Your Own Objects
In this chapter, we’ll take a look at two topics near and dear to the JavaScript programmer’s heart: using cookies and creating your own objects.
Everyone knows about cookies—they’re those data items that you can store on someone’s computer. You can store everything from the users’ name (if they give it to you) to the current items they’ve purchased and how much their total is. Using cookies is easier than you might think in JavaScript, and we’ll take a look at how to work with them in this chapter. We’ll see not only how to create and store a cookie, but also what’s involved in reading them at a ...
Get Inside JavaScript 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.