Specifies the maximum age of the cookie in seconds before it expires. A negative value ( -1 ) indicates the default, that the cookie should expire when the browser exits. A zero ( 0 ) value tells the browser to delete the cookie immediately.
you can do one thing that on click of button , you can write the code ..
yourCookieName.setMaxAge(0);
It will delete the cookie immediately.
Post by:autobot
For my next trick, I'll need the help of a tiny ad ...
a bit of art, as a gift, that will fit in a stocking