How Will You Delete a Cookie in JSP ?

We can use following options to delete a Cookie in JSP...

setMaxAge() : we can set the maximum age of a cookie. After this time period, Cookie will expire and will be deleted.

Header : We can also set the expiry time in header of response. Respone.setHeader(). This will also expire the cookie after specified time period.



You May Interest

What is the Difference Between pass by reference and pass by valu ...

What is Volatile Keyword in Java ?

What are the Differences Between Internal and External Iterator i ...

What is the Difference Between init-param and context-param in JS ...

What is the Difference Between Expression and Scriptlet in JSP ?