O'Reilly logo

Sams Teach Yourself JavaScript™ in 24 Hours, Fifth Edition by Phil Ballard, Michael Moncur

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

Hour 10. JavaScript and Cookies

What You’ll Learn in This Hour

• What cookies are

• All about cookie attributes

• How to set and retrieve cookies

• About cookie expiration dates

• How to save multiple data items in a single cookie

• Deleting cookies

• Escaping and unescaping data

• Limitations of cookies

Something that the JavaScript techniques that you have seen so far can’t do is transfer information from one page to another. Cookies provide a convenient way to give your web pages the means to store and retrieve small pieces of information on a user’s own computer, allowing your website to save details such as a user’s preferences or dates of his or her prior visits to your site.

In this hour you learn how to create, save, retrieve, and delete ...

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