Advanced Cookie Stuff

The basics of cookies are straightforward: You give a cookie to the browser, and the browser gives it back later. There's more to them than that, though. You can set cookies to last for a long time. Such cookies are called persistent cookies. They can be told to return only to another particular URL, and they can indicate something about how secure your connection is.

Remembering Cookies

So far, the cookies you've set on the browser have been temporary: As soon as the browser is closed, the cookie disappears. When you're using cookies to save values among multiple pages on a form—instead of hidden HTML values—using temporary cookies is entirely appropriate. When a new browser is started, you don't want the cookie being returned ...

Get Sams Teach Yourself Perl in 24 Hours 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.