|
Posted by C. (http://symcbean.blogspot.com/) on 10/07/07 11:36
On 6 Oct, 23:17, "Guillaume Dargaud" <USE_MY_WEB_F...@gdargaud.net>
wrote:
> Hello all,
> I'm trying to do something very simple: delete (or empty) a cookie.
> The following code (which I found in the PHP doc) works fine in IE6 but not
> in Firefox:
> setcookie ("Cart", "", time() - 3600);
So you're asking the browser to create a cookie which should have
expired an hour ago. When one already exists. While this is documented
in the set_cookie() function page as way of achieving the desired
result, it strikes me as an ugly hack. I think a better way to solve
this would be to set a cookie which expires in the future with a value
indicating that it no longer references a valid server-side state.
If you can find something in the HTTP RFCs which says this should
work, then by all means raise it as a bug with the FireFox developers.
C.
Navigation:
[Reply to this message]
|