Chrome不会删除会话Cookie [英] Chrome doesn't delete session cookies

查看:333
本文介绍了Chrome不会删除会话Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在javascript中设置会话cookie,如下所示:

I'm trying to set session cookie in javascript like this:

document.cookie = 'name=alex; path=/'

但Chrome不会删除它,即使我退出浏览器并再次启动。

But Chrome doesn't delete it even if I quit browser and launch it again.

我检查了Firefox和Opera,并且都按预期工作 - 在浏览器退出时删除了会话Cookie。

I checked in Firefox and Opera and both work as intended - they delete session cookie on browser exit.

Chrome是否忽略了过期规则?

Is Chrome just ignoring expiration rules?

我检查了多个操作系统,发现会在Windows XP和Ubuntu中的Chrome上删除会话Cookie,但在Mac OSX Lion中不会。

I checked in multiple OSes and found out that session cookie gets removed on Chrome in Windows XP and Ubuntu, but NOT in Mac OSX Lion.

推荐答案

这可能是因为Chrome设置为继续离开的地方

This can be caused by having Chrome set to Continue where you left off.

>

  • Bug report: Chrome is not deleting temporary cookies – i.e. not logging me out automatically when I close all browser Windows
  • Issue 128513 in Chromium: Session Cookies not cleared when Chrome processes closed

这篇关于Chrome不会删除会话Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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