Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
wants code for handling cookies in web browser.
i.e,on exiting web browser application it all cookies should
be cleared and also history should be cleared..


in which event should this code be pasted or written and how to link it with web browser...
Posted
Updated 25-Feb-12 21:56pm
v2
Comments
Sergey Alexandrovich Kryukov 26-Feb-12 1:56am    
And the question is..?
--SA

Have a look at delete_cookie() as described in this article JavaScript and Cookies[^].

This article[^] discusses removing cookies as well.

However note that the cookie is not actually deleted and that browsers may still store them until they are explicitly removed.
 
Share this answer
 
Example:
VB
Response.Cookies("userName").Value = "patrick"
Response.Cookies("userName").Expires = DateTime.Now.AddDays(1)

Dim aCookie As New HttpCookie("lastVisit")
aCookie.Value = DateTime.Now.ToString()
aCookie.Expires = DateTime.Now.AddDays(1)
Response.Cookies.Add(aCookie)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900