Laravel在浏览器关闭期届满会话不在Chrome中工作 [英] Laravel expire session on browser close not working in Chrome
问题描述
我正在使用Laravel Framework 4.1.21版,并且在浏览器关闭时,expire_on_close选项不会在Chrome中结束会话。我的config / session.php文件中的选项如下所示:
'driver'=> 'file',
'lifetime'=> 120,
'expire_on_close'=> true,
同样在开发人员工具栏的资源> Cookies中,Expires值设置为Session 为laravel_session cookie。
这虽然在Firefox中正常工作。任何想法我错过了什么?感谢!
这是Chrome功能的原因。当您关闭Google Chrome时,它实际上会在后台运行(如评论中所述)。
以下是详细信息: https://code.google.com/p/chromium/issues/detail?id=128513
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 !
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
这篇关于Laravel在浏览器关闭期届满会话不在Chrome中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!