Open session when closing browser, laravel 5.5 How are you
What can I do so that when I close the browser, the session is closed, since it is currently open.
I have changed 'expire_on_close' => false, in true but it is still the same
A case is normal to work well in firefox and not in opera and google chrome
nothing is sent to the server when the user closes the browser.
The expires on close is a flag to tell the browser to discard the session cookie when the tab is closed.
The only way to do it is to use javascript to detect the browser window closing and send a message to the server.
.... but why???
Well, sometimes there are careless people who close the browser and believe that their session too.
so, with the expire_on_close set, the session is as good as closed as the browser will have discarded the session cookie. If you look on the server, the session file will still exist but noone can use it.
Please sign in or create an account to participate in this conversation.