B
B
Bum19892017-08-10 00:32:14
PHP
Bum1989, 2017-08-10 00:32:14

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

2 answer(s)
S
Stalker_RED, 2017-08-10
@Bum1989

Does the browser remember which tabs were open, and then restore it? If so, then probably restores the session. Resolved by browser settings.

V
Vasya Surname, 2017-08-10
@bazilio2010

overwrite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question