What happens when a PHP cookie expires?

4.3k Views Asked by At

Can anyone tell me what happens when a PHP cookie expires? Will it be deleted? Will it be accessible?

2

There are 2 best solutions below

0
On BEST ANSWER

when a cookie expires, the browser do not send it to the server.

https://superuser.com/questions/356265/what-do-browsers-do-with-expired-cookies

0
On

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.