手册:$wgCookieExpiration
Appearance
Outdated translations are marked like this.
Cookies: $wgCookieExpiration | |
---|---|
在HTTP cookie过期前的秒数。 您可以使用$wgExtendedLoginCookieExpiration 替换为“记住我的登录状态”的cookie |
|
引进版本: | Before 1.1.0 |
移除版本: | 仍在使用 |
允许的值: | (整数) |
默认值: | 1.18–: 30 * 86400 1.19–1.28: 180 * 86400 (r94430) 1.29+: 30 * 86400 (Gerrit change 321592) |
其他设置: 按首字母排序 | 按功能排序 |
详情
默认值为30天(30*86400秒)。
这意味着大多数MediaWiki的cookie将持续30天。
当未设置“记住我的登录状态”选项时,这包括登录cookie。设置为“记住我的登录状态”时,将使用$wgExtendedLoginCookieExpiration
代替(尽管默认情况下,该设置会降为记住我的登录状态)。
When "记住我的登录状态" is not set, login expiry is also limited by $wgObjectCacheSessionExpiry
(the session expires when there is no interaction for that time span).
MediaWiki版本: | ≥ 1.22 |
从MediaWiki 1.22开始,可将此配置变量设置为0,这样cookie就只限会话当时。 这之前曾经记载可以工作,但会损坏。
这被WebResponse::setcookie和mw.cookie.set使用,尽管个别cookie可以有自定义的到期时间。