Chrome在关闭/退出时未清除SESSION COOKIES [英] Chrome not clearing SESSION COOKIES on close/exit

查看:1086
本文介绍了Chrome在关闭/退出时未清除SESSION COOKIES的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下方式在本地主机上开发应用程序:

Google Chrome 33.0.1750.154 m



XAMPP 1.8.3

我一直在使用这些片刻,现在突然间Chrome当我关闭浏览器(所有窗口)时,即使在重新启动我的机器后, session cookies 也没有清除 session cookies



这段代码在我的页面顶部:
$ b $

 <?php 
session_start();
if(!isset($ _ SESSION ['userID']))
{
echo'< script> alert('Username does not exist')< / script>;
echo'< script type =text / javascript> window.location的= 的login.html;< /脚本>;
exit(1);
}
?>

哪些工作正常,在浏览器关闭后将我重定向到登录页面,直到几小时前。
$ b

注意: b
经过测试的IE10,IE11和FF以及他们不会表现出相同的行为,他们正在按照预期清除会话cookie



我也证实

继续我离开的地方...

/ p>

有人知道这里发生了什么,以及如何解决它?

>感谢KevinB指引我朝着正确的方向发展。



原来,这不是我想象的cookie设置,我最终保持设置为:



允许设置本地数据(推荐)

我记得最近已经在我的机器上安装了

Google NOW

,并允许它运行在后台没有打开我的浏览器时,我认为这是导致我的会话cookie未被清除的罪魁祸首。



最终解决此问题的方法是取消选中 :
$ b 继续运行后台应用程序

设置在 SYSTEM 部分下。



希望这有助于节省一些麻烦。 b

I'm developing an app on localhost using:

Google Chrome 33.0.1750.154 m

XAMPP Version 1.8.3

I've been using these for a while now and today all of a sudden Chrome is not clearing session cookies when I close the browser (all windows), even after I restart my machine, session cookies are still set from last session.

I have this code at the top of my page:

<?php
session_start();
if(!isset($_SESSION['userID']))
{
        echo "<script>alert('Username does not exist')</script>";
        echo '<script type="text/javascript"> window.location="login.html";</script>';
        exit(1);
}
?>

Which worked fine, redirecting me to the login page after the browser has been closed, up until a few hours ago.

NOTE:

Tested IE10, IE11, and FF and they DO NOT exhibit the same behavior, they are clearing session cookies as expected.

I have also verified that the

Continue where I left off...

setting is unchecked.

Anybody know what's going on here and how to fix it?

解决方案

Thanks to KevinB for pointing me in the right direction.

Turns out it wasn't the cookie setting like I thought, I ended up keeping that set to:

Allow local data to be set (recommended)

I remembered that

Google NOW

had recently been installed on my machine, and that I allowed it to run in the background when I did not have my browser open, I believe this was the culprit to my session cookies not being cleared.

What ended up fixing this issue was to uncheck the:

Continue running background apps when Google Chrome is closed

setting under the SYSTEM section.

Hope this helps save some headaches....

这篇关于Chrome在关闭/退出时未清除SESSION COOKIES的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆