O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

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

Cookies: An Introduction

Cookies—sometimes called magic cookies, but more formally known as persistent client state HTTP cookies—enable you to store information on the client browser's computer for later retrieval. Although they have their drawbacks, cookies are the most powerful technique available for maintaining state within a Web site.

Netscape came up with the original cookie specification. There doesn't seem to be any good reason why Netscape chose that particular name. In fact, on its cookie specification page, Netscape even admits that "the state object is called a cookie for no compelling reason."

In their simplest form, cookies store data in the form of name=value pairs. You, the developer, can pick any name and value combination you ...

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