1717 */
1818class Session
1919{
20- /** Default file lifetime */
20+ /** Default server-side idle timeout */
2121 private const DefaultFileLifetime = 3 * Nette \Utils \DateTime::HOUR ;
2222
2323 private const SecurityOptions = [
@@ -41,8 +41,8 @@ class Session
4141 /** @var array<string, mixed> default configuration */
4242 private array $ options = [
4343 'cookie_samesite ' => IResponse::SameSiteLax,
44- 'cookie_lifetime ' => 0 , // for a maximum of 3 hours or until the browser is closed
45- 'gc_maxlifetime ' => self ::DefaultFileLifetime, // 3 hours
44+ 'cookie_lifetime ' => 0 , // session cookie - kept by the browser per its own policy
45+ 'gc_maxlifetime ' => self ::DefaultFileLifetime, // server-side idle timeout, independent of the cookie lifetime above
4646 ];
4747 private ?\SessionHandlerInterface $ handler = null ;
4848 private bool $ readAndClose = false ;
@@ -481,7 +481,7 @@ private function configure(array $config): void
481481
482482 /**
483483 * Sets the session lifetime as a time string (e.g. '20 minutes'), or null to revert to the default
484- * (up to 3 hours or until the browser is closed ).
484+ * (a 3-hour server-side idle timeout; the session cookie itself is kept by the browser per its own policy ).
485485 */
486486 public function setExpiration (?string $ expire ): static
487487 {
0 commit comments