From c32ad191da9abba58e539fe1ce164536c6d65f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Borntr=C3=A4ger?= Date: Tue, 6 Aug 2019 13:07:17 +0200 Subject: [PATCH] docs: expand description of the rolling option closes #677 --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9eb012b..a1ed3fa1 100644 --- a/README.md +++ b/README.md @@ -228,15 +228,24 @@ likely need `resave: true`. ##### rolling -Force a session identifier cookie to be set on every response. The expiration +Force the session identifier cookie to be set on every response. The expiration is reset to the original [`maxAge`](#cookiemaxage), resetting the expiration countdown. The default value is `false`. +With this enabled, the session identifier cookie will expire in +[`maxAge`](#cookiemaxage) since the last response was sent instead of in +[`maxAge`](#cookiemaxage) since the session was last modified by the server. + +This is typically used in conjuction with short, non-session-length +[`maxAge`](#cookiemaxage) values to provide a quick timeout of the session data +with reduced potentional of it occurring during on going server interactions. + **Note** When this option is set to `true` but the `saveUninitialized` option is set to `false`, the cookie will not be set on a response with an uninitialized -session. +session. This option only modifies the behavior when an existing session was +loaded for the request. ##### saveUninitialized