Chapter 8. Handling Cookies

Topics in This Chapter

  • Understanding the benefits and drawbacks of cookies

  • Sending outgoing cookies

  • Receiving incoming cookies

  • Tracking repeat visitors

  • Specifying cookie attributes

  • Differentiating between session cookies and persistent cookies

  • Simplifying cookie usage with utility classes

  • Modifying cookie values

  • Remembering user preferences

Cookies are small bits of textual information that a Web server sends to a browser and that the browser later returns unchanged when visiting the same Web site or domain. By letting the server read information it sent the client previously, the site can provide visitors with a number of conveniences such as presenting the site the way the visitor previously customized it or letting identifiable ...

Get Core Servlets and JavaServer Pages™: Volume 1: Core Technologies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.