Skip navigation
anil.saldhana

Tasty Cookies

Posted by anil.saldhana Apr 25, 2005
Cookie is that goodie that is sent back to the client (Eg: Browser). It is a mechanism by which the server distinguishes client requests and maintains session on the server.

Documentation from Netscape on cookies can be found here: http://wp.netscape.com/newsref/std/cookie_spec.html

A treatment on HTTP Session Management is here: http://jan.netcomp.monash.edu.au/ecommerce/session.html

 

A Cookie is so tasty that somebody has a website for it: http://www.cookiecentral.com/cm002.htm

 

I would like to remind users to always use response.setEncodeURL(url) to encode the url just in case the client's browser does not eat cookies.

 

Generally, users want to invalidate sessions on logout. So they invalidate the session on the serverside. But do send back a cookie with MaxAge set to 0, so that lingering session cookies in the browser do not create problems in your servlet code.

 

Cookie Max Age

Go get some cookies!!!

Filter Blog

By date: