How do cookies, server sessions, browser storage and cache affect web testing?
Answer
They hold different kinds of client or server-linked state and can change authentication, personalization and freshness. Test clean and returning sessions, expiry, revocation, multi-tab behaviour, cache invalidation and isolation between users.
Strong answer includes
- understands where state lives
- expiry and invalidation
- cross-user isolation
Practical example
A tester logs in as User A in one tab, then opens a second tab and logs in as User B, and confirms the app doesn't leak User A's cached dashboard data into User B's session due to a shared browser-storage key. They also test that revoking a session server-side (e.g., admin force-logout) actually invalidates the client's cookie on the next request rather than relying only on client-side expiry.