Performance: Session security considerations
HIGH IMPACT
This affects the security and integrity of user sessions, impacting user trust and application reliability rather than direct page speed.
SESSION_COOKIE_SECURE = True SESSION_COOKIE_HTTPONLY = True SESSION_EXPIRE_AT_BROWSER_CLOSE = True SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies' # Rotate session keys on login/logout
SESSION_COOKIE_SECURE = False SESSION_COOKIE_HTTPONLY = False SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Using default session engine without encryption or rotation
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Insecure session cookies (no Secure or HttpOnly flags) | 0 | 0 | 0 | [X] Bad |
| Secure, HttpOnly session cookies with expiration | 0 | 0 | 0 | [OK] Good |