Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgCookieExpiration and the translation is 42% complete.
Other languages:
English • ‎español • ‎magyar • ‎polski • ‎русский • ‎中文 • ‎日本語
Cookie: $wgCookieExpiration
Number of seconds before HTTP cookies expire. You can override this for 'keep me logged in' cookies with $wgExtendedLoginCookieExpiration
導入されたバージョン:pre 1.1.0
既定値:1.18–: 30 * 86400
1.19–1.28: 180 * 86400 (r94430)
1.29+: 30 * 86400 (Gerrit change 321592)


既定値は 30 日間 (30 * 86400 秒) です。 This means most MediaWiki cookies will last 30 days. This includes, "keep me logged in" cookies, unless $wgExtendedLoginCookieExpiration is used (which defaults to 180 days).

MediaWiki バージョン: 1.22

Since MediaWiki 1.22 setting this configuration variable to 0 makes cookies session-only. This was previously documented as working, but broken.

This is used by WebResponse::setcookie and mw.cookie.set, though an individual cookie can have a custom expiration.