S
S
sabes2021-01-18 09:03:38
PHP
sabes, 2021-01-18 09:03:38

PHP sessions work after browser reload?

I read that sessions live only until the browser is restarted, and in fact it was like that on my site, until some time. After reinstalling Windows, I noticed that the site does not crash into the authorization window if you restart the browser (any), while the "Remember user" mode is turned off, i.e. session-only authentication is enabled. Is there any reason for this other than faulty code? OpenServer/PHP 7.1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanatPHP, 2021-01-18
@sabes

Obviously, in the browser settings, uncheck the "start from the same place" checkbox.
But no one will do it anyway.
So fading a session in our time is possible only by timeout, and depends on the garbage collector killing old session files.

A
Anton R., 2021-01-18
@anton_reut

Of course, because cookies with the session id are saved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question