Mobile browser(chrome, safari) not killing cookies with expire time set to '0', Same cookie persists when browser is reopened...
Asked
Active
Viewed 2,734 times
7
-
On which OS? Most of them don't actually close the browser, they just suspend it but the session continues – philipobenito Jan 25 '13 at 17:55
-
Even when I force stop Chrome on Android, session cookies persist. – user2577633 Mar 17 '14 at 23:34
-
possible duplicate of [Chrome doesn't delete session cookies](http://stackoverflow.com/questions/10617954/chrome-doesnt-delete-session-cookies) – fzzle Mar 21 '14 at 11:56
1 Answers
-3
Cookies must be deleted with the same parameters as they were set with. If the value argument is an empty string, or FALSE, and all other arguments match a previous call to setcookie, then the cookie with the specified name will be deleted from the remote client. This is internally achieved by setting value to 'deleted' and expiration time to one year in past.
From the official manual: http://php.net/manual/en/function.setcookie.php

Max Langerak
- 1,187
- 8
- 17
-
Question was about session cookies not getting deleted on mobile browsers, not deleting cookies in general. – SRB Apr 28 '16 at 04:18