Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when will cookie information destroy?

Answer Posted / balakrishna

cookie is a"small amount of data" that is set by the server
on the client.

we have setmaxAge() for destroy cookie.

1.cookie.setMaxAge(100)-->100 sec
If we set the max age of a cookie to 100 sec,the browser
holds the cookie for 100 sec even if we close the browser.

2.If we set max age value to negative value the browser hold
the cookie till we close the browser.

3.If we use setMaxAge(0) the browser will arase the cookie.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is servlet thread safe?

1038


Explain mvc pattern.

1074


Describe in brief RequestDespatcher?

1182


Should I override the service() method?

1138


What is servlet used for?

1193


How to find whether a parameter exists in the request object?

1158


In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify

1068


What is a web container and what is its responsibility?

1031


When a client request is sent to the servlet container, how does the container choose which servlet to invoke?

1077


What is difference between server and servlet?

1137


Why servlet is faster than jsp?

1133


How do you load an image in a Servlet?

1230


What are the exceptions thrown by servlets? Why?

1245


What are the different methods involved in generic servlet?

1150


What are the disadvantages of storing session state in cookies?

1189