Django Book 翻译
菜单>:
TOC
返回
原文:
You might have noticed that the cookie Google sent us contained ``expires=Sun, 17-Jan-2038 19:14:07 GMT;`` . Cookies can optionally contain an expiration date that advises the browser on when to remove the cookie. If a cookie doesnt contain an expiration value, the browser will expire it when the user closes his or her browser window. You can control the session frameworks behavior in this regard with the ``SESSION_EXPIRE_AT_BROWSER_CLOSE`` setting.
翻译:
你可能注意到了,Google给我们发送的cookie中有 ``expires=Sun, 17-Jan-2038 19:14:07 GMT;`` cookie可以有过期时间,这样浏览器就知道什么时候可以删除cookie了。如果cookie没有设置过期时间,当用户关闭浏览器的时候,cookie就自动过期了。你可以改变 ``SESSION_EXPIRE_AT_BROWSER_CLOSE`` 的设置来控制session框架的这一行为。
备注:
译者: