Defining and Using Cookies

You can define cookies independently of sessions or in conjunction with sessions. Cookies and sessions are typically implemented as a set when managing transactions in web applications. You use cookies by themselves when building web pages that do not authenticate users visiting your site. When you define cookies without sessions, the cookies contain all the information to support your transactions.

Cookies for nonauthenticated users are convenient because you don’t know if they’ll revisit your site. Consuming server-side resources for these users is potentially a waste of server resources. While placing the information on the client machine exposes the behaviors of those users to anyone who accesses the cookie, it ...

Get Oracle Database 10g Express Edition PHP Web Programming 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.