What is the difference between browser cache and cookies, and why does clearing one but not the other have such different effects on your browsing experience?
Think about your answer, then reveal below.
Model answer: The cache stores copies of page resources (images, scripts, CSS files) as a performance optimization — the browser saves these files locally so repeat visits load faster without re-downloading unchanged content. Cookies are small data files that websites deliberately write to your browser to store state: session tokens (keeping you logged in), preferences, and tracking data. Clearing the cache removes performance copies but leaves authentication intact, so you stay logged in but pages may reload slower. Clearing cookies removes session tokens, so servers can no longer verify your identity, logging you out everywhere — even though no page resources were touched.
The distinction matters because people often conflate cache and cookies as 'browser junk to clear.' They are architecturally different: the cache is a read-through layer the browser manages transparently; cookies are explicitly written by websites to persist state. Knowing which does what helps you diagnose specific problems — stale page content (clear cache), persistent login issues (clear cookies), privacy concerns about identity tracking (clear cookies) — rather than blindly clearing everything.