Cookies for mobile browsers (chrome, safari) are not deleted when the session is closed

The mobile browser (chrome, safari) does not kill cookies with the expiration of the time set to '0', the same cookie is saved when the browser is open again ...

+6
source share
1 answer

Cookies must be deleted with the same settings with which they were set. If the value argument is an empty string or FALSE, and all other arguments correspond to the previous setcookie call, the cookie with the specified name will be deleted from the remote client. This is internally achieved by setting the value to "remote" and the validity period to one year in the past.

From the official guide: http://php.net/manual/en/function.setcookie.php

-3
source

All Articles