Firefox会话Cookie [英] Firefox session cookies

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

问题描述

一般来说,如果给定一个没有期限的cookie,现代浏览器会认为这个cookie是一个会话cookie,它们将在浏览会话结束时删除cookie(通常是在浏览器实例关闭时) 。

Generally speaking, when given a cookie that has no expiration period, modern browsers will consider this cookie to be a 'session cookie', they will remove the cookie at the end of the browsing session (generally when the browser instance closes).

IE,Opera,Safari和Chrome都支持这种行为。

IE, Opera, Safari and Chrome all support this behavior.

正确的释放)似乎不遵循这个规则,从我可以告诉它,当浏览器关闭,或者当用户注销或重新启动操作系统时,它不会过期。

However firefox (3.0.9 latest proper release) appears not to follow this rule, from what I can tell it doesn't expire the cookies when the browser is closed, or when the user logs off or restarts the OS..

那么,为什么firefox会将这些参数称为会话cookie,当他们最后一次无限期?

So, why does firefox refer to these as session cookies, when they last aparently indefinitely?

有谁知道Firefox如何处理会话cookie过期? p>

Does anyone know how Firefox handles session cookie expiration?

推荐答案

这显然是设计。查看这个Bugzilla错误:
https://bugzilla.mozilla.org/ show_bug.cgi?id = 443354

This is apparently by design. Check out this Bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=443354

Firefox具有关闭Firefox的功能,它提供保存所有选项卡,然后还原浏览器和这些标签返回。这就是所谓的会话恢复。我没有意识到,它也将恢复所有的会话cookie的那些页面!

Firefox has a feature where you close Firefox and it offers to save all your tabs, and then you restore the browser and those tabs come back. That's called session restore. What I didn't realize is that it'll also restore all the session cookies for those pages too! It treats it like you had never closed the browser.

这是有意义的,如果你的浏览器崩溃,你回到你的位置,但是有点令人不安的web开发者用于会话cookie得到清除。

This makes sense in the sense that if your browser crashed you get right back to where you were, but is a little disconcerting for web devs used to session cookies getting cleared. I've got some old session cookies from months ago that were set by sites I always have open in tabs.

要测试这一点,请关闭浏览器中的所有标签页,然后关闭浏览器并重新启动它。我认为您的网站的会话Cookie应该清除在这种情况下。否则,您必须关闭会话还原。

To test this out, close all the tabs in your browser, then close the browser and restart it. I think the session cookies for your site should clear in that case. Otherwise you'd have to turn off session restore.

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

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