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

查看:34
本文介绍了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?

我检查了多个操作系统,发现会话 cookie 在 Windows XP 和 Ubuntu 中的 Chrome 上被删除,但在 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.

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

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