Answer the question
In order to leave comments, you need to log in
Why doesn't the cookie die after closing the browser?
Good afternoon!
PHP 5.6.30, XAMPP build
php.ini setting session.cookie_lifetime=0
Start session. The browser creates a cookie with the PHPSESSID. In the browser settings, I see that the Expires parameter of this cookie is equal to "At end of session".
I close the browser, comment on the start of the session in the script, open the browser - the cookie is alive.
I create a test cookie manually without specifying the destruction time, in the browser settings I see that the Expires parameter of this cookie is equal to "At end of session". I close the browser, comment on the setting of the cookie, open the browser - this cookie is also alive.
Tested in Chrome and Firefox. Both browsers have the same behavior.
What's wrong? Why don't they die after browser restart?
Answer the question
In order to leave comments, you need to log in
Does the browser remember which tabs were open, and then restore it? If so, then probably restores the session. Resolved by browser settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question