diff --git a/functions/http.xml b/functions/http.xml index 415515034b..b378215e50 100644 --- a/functions/http.xml +++ b/functions/http.xml @@ -200,11 +200,14 @@ setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1); <function>setcookie</function> delete examples setcookie ("TestCookie"); -setcookie ("TestCookie", "", time()); -setcookie ("TestCookie", "", time(), "/~rasmus/", ".utoronto.ca", 1); +// set the expiration date to one minute ago +setcookie ("TestCookie", "", time() - 3600); +setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1); - + When deleting a cookie you should assure that the expiration date + is in the past, to trigger the removal mechanism in your browser. + Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it