What Is a Cookie

A cookie is a small piece of text that a website asks your browser to store, and hand back on every later visit, so the site can recognize you and remember things between requests — it exists to solve a basic limitation from the how-the-internet-works topic: each HTTP request is independent, so without some kind of memory a website would forget who you are the instant one request ends. When you log in or set a preference, the server sends back a little labeled note — for example `session=abc123` — and your browser, as the web-browser topic described, saves it and automatically attaches it to every future request to that same site. On the next page you load, the site sees that note and knows "this is the same visitor who just logged in," which is exactly how a site keeps you signed in as you click around, how a shopping cart remembers its items, and how a site recalls your language or dark-mode choice. That makes cookies ordinary and genuinely useful; the controversy comes from how they can also be used to track people. It helps to separate two kinds. A first-party cookie is set by the site you are actually visiting and is what makes that site work — logins, carts, preferences. A third-party cookie is set not by the site in your address bar but by another company whose content (often an ad or a tracking script) is embedded in the page; because that same company's code appears on many different sites, its cookie can recognize you across all of them and quietly build a profile of your browsing, which is the privacy concern behind cookie-consent banners and the industry's ongoing move to phase third-party cookies out. Two properties make cookies manageable. They can carry an expiry: a session cookie is deleted when you close the browser, while a persistent cookie survives for a set time so a site can remember you for days or weeks. And they are scoped to a single site: by design, a cookie set by one site is only ever sent back to that same site, so one site cannot directly read another's cookies. This also ties back to the staying-safe-online topic, because a cookie that keeps you logged in is a kind of key — anyone who steals it could impersonate your session — which is why sensitive cookies are protected and only sent over the encrypted HTTPS connection. The practical takeaway is that a cookie is not a program and cannot harm your computer; it is just a small remembered note. First-party cookies are mostly what make the modern web usable, third-party cookies are what raised the tracking concerns, and you stay in control through your browser's settings to view, block, or clear them whenever you choose.

You log in or set a preference
the server needs to remember this for next time
Server sends a cookie
a small labeled note, e.g. session=abc123
Browser stores it and sends it back
attached automatically to every later request to that same site
First-party cookie
set by the site you are on — logins, carts, preferences
Third-party cookie
set by embedded ad/tracker code — recognizes you across sites
How a Cookie Gives a Website Memory each request is independent, so the site hands you a note to carry back You log in first request Server sets session=abc123 response includes the cookie Browser stores it session=abc123 next request auto-sends the cookie Server recognizes you "same visitor — still logged in" a cookie is only ever sent back to the same site that set it — it is a note, not a program
First-Party vs. Third-Party Cookies who set it decides whether it is helpful or a tracker First-party set by the site you are actually on keeps you logged in remembers your cart and preferences mostly what makes the web usable Third-party set by embedded ad / tracker code the same code appears on many sites so it recognizes you across all of them the reason for consent banners + phase-out

Take what is a cookie further

Ask the copilot about this term, or have our engineers assess it against your process.