Performance: Session expiry behavior
MEDIUM IMPACT
This affects page load speed and user interaction by controlling session validation and cookie expiration timing.
SESSION_COOKIE_AGE = 1209600 # 2 weeks SESSION_SAVE_EVERY_REQUEST = True
SESSION_COOKIE_AGE = 60 # 1 minute SESSION_SAVE_EVERY_REQUEST = False
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Short session expiry (1 min) | Minimal | 0 | Minimal | [X] Bad - causes frequent server requests and delays |
| Long session expiry with refresh | Minimal | 0 | Minimal | [OK] Good - reduces server load and improves interaction speed |