Laravel expire session on browser close not workin

2019-06-17 06:30发布

I am using Laravel Framework version 4.1.21 and the "expire_on_close" option does not end the session in Chrome when the browser is closed. The options in my config/session.php file look like this:

'driver' => 'file',
'lifetime' => 120,
'expire_on_close' => true,

Also in the developer toolbar, under Resources > Cookies, the Expires value is set to "Session" for the laravel_session cookie.

This works fine in Firefox though. Any ideas what am I missing ? Thanks !

1条回答
老娘就宠你
2楼-- · 2019-06-17 06:46

It's becasue of Chrome's feature. When you close Google Chrome, it actually runs on background (as mentioned on comments).

Here's detailed information: https://code.google.com/p/chromium/issues/detail?id=128513

查看更多
登录 后发表回答