Shakti Singh Shakti Singh - 7 months ago 35
PHP Question

When does a cookie with expiration time 'At end of session' expire?

There is a session cookie with expiration time which says 'At end of session'.
When exactly does it expire or will it be alive forever?


When you use setcookie, you can either set the expiration time to 0 or simply omit the parametre - the cookie will then expire at the end of session (ie, when you close the browser).