Problems with Cookies

Before using cookies in an application, you should be aware of the problems associated with cookies. For these reasons—and others that may crop up in the future—you should be careful to design your web pages and CGI programs so that cookies are entirely optional.

For example, if you're using cookies to store user preferences, you should use a default set of preferences if cookies are not available. You must code defensively.

Cookies Are Ephemeral

As I've mentioned throughout this hour, cookies are ephemeral. Cookies can be deleted from the user's system, edited by the user, or simply thrown away by the browser for no apparent reason. A browser can accept the cookie, use it for a short time, and then simply forget it for ...

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