Can someone specify me a method for killing cookies from Web page? I need an efficient method of doing this.
Printable View
Can someone specify me a method for killing cookies from Web page? I need an efficient method of doing this.
You can either use predefined function for killing cookies or you can do it by setting the expiration date to some time in the past which makes the cookie to expire immediately and thus cookies are killed.
Php code: when deleting a cookie you should assure that the expiration date is in the past, to trigger the removal mechanism in your browser. Examples follow how to delete cookies sent in previous example: <?php // set the expiration date to one hour ago setcookie ("testcookie", "", time() - 3600); setcookie ("testcookie", "", time() - 3600, "/~rasmus/", ".example.com", 1); ?> for asp.net custom cookies killing see this link below [url=http://www.shiningstar.net/aspnet_articles/customprovider/customprovider14.aspx]creating a custom membership provider and membership user utilizing a data set table adapter[/url]