when will cookie information destroy?

Answer Posted / bijaya

Cookie is a small unit of information created at the server and is maintained at the client side.
This information is managed by HTTP protocol.
The cookie will be exiating in the client for the time period specified by the MaxAge property,
So,to destroy the the cookie we have to set the MaxAge to 0.
Ex:
cookie.setMaxAge(0);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better jsp or servlet?

545


What is called Scriptlet?

551


Difference between httpservlet and generic servlets?

600


Explain the role of dispatcherservlet and contextloaderlistener.

595


Explain the difference between get and post method in servlet?

594






Explain url encoding?

512


What is servlet in tomcat?

550


What is the life cycle of a servlet?

773


List out the difference between ServletConfig and ServletContext?

593


What is the type of method for sending request from http server?

586


What are the differences between servlet context vs servlet config?

575


What's the use of servletcontext?

671


How can a servlet be used to generate plain text instead of html?

537


What are the various ways of session supervision in servlets?

512


How to commuincate between an applet and a servlet?

583