Skip to main content

Command Palette

Search for a command to run...

πŸͺ Cookies Explained Like You're 5

Published
β€’2 min read
S

Building AI systems and writing about how they actually work. Master of AI @ University of Technology Sydney. Previously B.Tech CS with focus on IoT. I believe the best way to learn is to explain. That's why I'm documenting tech concepts with simple analogies (@sreekarreddy.com). AWS Certified β€’ Azure AI Certified β€’ Neo4j Professional β€’ Google Data Analytics When not coding: exploring Sydney, working on side projects, and teaching tech to anyone who'll listen.

A wristband at a club

Day 44 of 149

πŸ‘‰ Full deep-dive with code examples


The Club Wristband

You go to a club. Pay at the door. Get a wristband.

Now you can:

  • Leave and come back
  • Staff knows you already paid
  • No need to pay again

Cookies are digital wristbands!


How They Work

  1. You visit a website
  2. Website gives your browser a "cookie" (a small piece of data)
  3. Next time you visit, browser shows the cookie
  4. Website recognizes you!
Visit 1: "Here's your cookie: user=alex"
Visit 2: Browser shows cookie β†’ "Welcome back, Alex!"

What Cookies Store

  • Login status (so you stay logged in)
  • Shopping cart items
  • Preferences (dark mode, language)
  • Tracking info (ads use this)

Types

TypeWhat it means
SessionTypically lasts for the current browsing session (but some browsers can restore them)
PersistentHas an expiry time/date; can last days/weeks/months
Third-partySet by a different site than the one you're visiting (often used for ads/analytics)

Privacy Concerns

Cookies can be used for tracking across websites. That's why many sites ask: "Do you accept cookies?" πŸͺ


In One Sentence

Cookies are small pieces of data websites store in your browser to remember who you are and your preferences.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

More from this blog

esreekarreddy

132 posts