O'Reilly logo

Inside JavaScript by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23. Cookies and Creating Your Own Objects

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required