VibeDict

Cookies vs Cache

A cookie is a tiny note that remembers who you are. A cache is a storage box that keeps files you already downloaded so they don't have to be downloaded again.

Cookies & Sessions

A tiny note that remembers 'you', like whether you're logged in.

Cache

A storage box for images, files, and data you've already downloaded.

At a glance

Cookies & SessionsCache
What it remembersPeople (login, settings)Files and data
SizeVery smallLarge
If you clear itYou get logged outThings load a bit slower at first
Common phrase'Accept cookies''Clear your cache and refresh'

Use “Cookies & Sessions” when…

  • To keep people logged in
  • To remember settings like language or dark mode
  • To remember a shopping cart

🤖 Say it to your AI like this

Keep the login state with a cookie. Set the cookie to httpOnly and secure, and delete it when the user logs out.

More about Cookies & Sessions →

Use “Cache” when…

  • When you want your site to open faster
  • When loading data that rarely changes over and over
  • When your fix doesn't seem to show up (clear the cache)

🤖 Say it to your AI like this

My changes don't show up on the live site. Tell me how to check if the cache is the cause, and how to make the cache refresh automatically when I deploy.

More about Cache →

💡 How not to mix them up

If you fixed something and the screen looks the same, try a hard refresh first (Ctrl/Cmd + Shift + R). It's usually the cache.

More comparisons

← All comparisons