Why does every website ask about cookies?
Written by Daniel Gélinas, checked against primary sources. Last checked .
The short answer
A cookie is a small note a website leaves in your browser. Some are useful, like the one that remembers your shopping cart; others come from ad companies and can follow you from site to site. That's why the law in places like Europe says sites must ask first.
The video
Dan is buying hiking boots. He finds the pair, puts them in his cart, and up pops a banner: “We use cookies.”
He clicks “Accept all” without reading it, the way he always does. Then he stops.
“Why does every website ask?”
“Follow your cart,” says Liz.
A cookie is a little note
When Dan put the boots in his cart, the shop left a small note in his browser (the app he uses to visit websites). Each time he comes back, his browser hands the note back to the shop, and the shop remembers what's in his cart.
That note is a cookie. Often it doesn't even hold the boots: it holds a code, and the shop keeps the cart on its own computers, under that code. Either way, the note is how the shop knows it's him.
Cookies like this one are useful. They keep your cart full, keep you signed in, and remember that you wanted the site in English.
Some notes follow you
But the shop isn't the only one leaving notes.
Most websites include bits of other companies: an ad here, a “like” button there, a tracking code nobody sees. Many of those come from the same few ad companies, hidden on thousands of sites. Each one can leave its own note in your browser and read it back on every site where it's hidden.
So the ad company sees Dan on the boot shop. Then on the recipe site. Then on the news site. And that's how it happens: Dan's boots show up as an ad everywhere he goes.
“My boots ad! It's everywhere!”
Those are the notes the banners are really about.
Why sites have to ask
In the European Union and the UK, the law says a website may only leave notes in your browser if you agree first. There's one big exception: notes the site needs to do what you asked, like your cart or your sign-in.
That's why the banner exists, and why you see it everywhere, not just on European sites: many sites outside Europe have European visitors, and showing one banner to everybody is simpler.
Since February 2026, the UK also lets sites skip the question for some site statistics and remembered preferences, as long as you can say no. Advertising notes still need your yes in both places.
What “Reject all” does
Dan worries: “If I say no, do I lose my cart?”
No. “Reject all” still lets the site keep the notes it needs, like your cart and your sign-in. Europe's privacy regulators use exactly those two as examples.
A few things to know, though:
- Rejecting keeps new notes out. It doesn't erase old ones. If you clicked “Accept all” last week, those notes are still in your browser until you delete them or take your yes back. The law says taking it back must be as easy as giving it, and many sites have a “cookie settings” link at the bottom of the page.
- Some extras may wait for your yes. Embedded videos, maps and social posts come from other companies, with their own cookies. Many sites show a “click to load” box instead until you agree.
- Badly built sites sometimes break. If a site files the cookie it really needs under “marketing”, rejecting can break the sign-in or the checkout. That's the site's mistake, not the law.
What a site can't do
In the EU, a site isn't supposed to lock you out for saying no. A page that shows nothing until you click “Accept” is what regulators call a cookie wall, and they say a yes given that way doesn't count.
“Accept or pay”, where a news site offers tracking or a subscription, is less settled. Regulators say the biggest platforms mostly can't rely on it, but the rules for other sites are still being argued.
Your browser already helps
The notes that follow you around are called third-party cookies, and browsers treat them differently:
- Safari has blocked them by default since 2020.
- Firefox gives each website its own cookie jar, so a note left on one site can't be read on another.
- Chrome still allows them. Google planned for years to remove them, then decided in 2025 to keep them, as a setting you can change.
So on Chrome, the banner is still doing real work.
Back to the boots
Dan's next shop is a hat shop. The banner pops up. This time he clicks “Reject all”, puts a wool hat in his cart, and his cart still works.
His conclusion: a cookie is a little note in his browser. Some help. Some follow him. Now he knows which button keeps which.
What you can do
- Click Reject all when you don't need a site's extras. Your cart and sign-in still work.
- Already accepted? Look for a cookie settings or privacy choices link at the bottom of the site, and change your answer there.
- On Chrome, block the notes that follow you: Settings → Privacy and security → Third-party cookies → Block third-party cookies. A few sites may ask you to sign in again.
- To clear one site's notes in Chrome: Settings → Privacy and security → Third-party cookies → See all site data and permissions, search for the site, then Delete.
- If a site breaks after “Reject all”, try its cookie settings and allow only what it calls necessary or functional.
Sources
- MDN Web Docs: Using HTTP cookies (developer.mozilla.org)
A cookie is a small piece of data a website sends to your browser, which sends it back on later visits. Remembering shopping cart contents is one of its main uses.
- MDN Web Docs: Third-party cookies (developer.mozilla.org)
Cookies from companies embedded on many sites can be combined into a profile of your browsing, and used to “chase users around the web with targeted ads”.
- EU ePrivacy Directive, Article 5(3) (eur-lex.europa.eu)
Sites may only store information on your device with your consent, except what is strictly necessary for the service you asked for. This is the rule behind cookie banners.
- UK legislation: the Privacy and Electronic Communications Regulations, regulation 6 and Schedule A1 (legislation.gov.uk)
The UK's version of the same rule. Since February 2026 it also exempts some analytics and site-preference cookies, but never advertising ones.
- Article 29 Working Party: Opinion 04/2012 on cookie consent exemption (ec.europa.eu)
Europe's privacy regulators give shopping cart and sign-in cookies, kept for your visit, as examples of cookies that don't need consent.
- European Data Protection Board: Guidelines 05/2020 on consent (edpb.europa.eu)
A site that shows nothing until you accept cookies (a “cookie wall”) doesn't get valid consent.
- European Data Protection Board: Opinion 08/2024 on “consent or pay” (edpb.europa.eu)
In most cases, large online platforms can't get valid consent by offering only a choice between accepting tracking and paying.
- GDPR, Article 7 (eur-lex.europa.eu)
You can withdraw your consent at any time, and it must be as easy to withdraw as to give.
- WebKit (Apple): Full third-party cookie blocking (webkit.org)
Since March 2020, Safari blocks cookies from other sites by default.
- Mozilla: Total Cookie Protection by default (blog.mozilla.org)
Since June 2022, Firefox on computers gives each website its own “cookie jar”, so cookies can't follow you between sites.
- Google: Next steps for Privacy Sandbox and tracking protections in Chrome (privacysandbox.google.com)
In April 2025, Google decided to keep third-party cookies in Chrome, managed in its settings, after years of plans to remove them.
- Google Chrome Help: Delete, allow and manage cookies in Chrome (support.google.com)
Where to block third-party cookies in Chrome, and how to delete one site's cookies.
Related questions
- Is my phone listening to me?
You said “pizza oven” once, and now the ads are everywhere. Here's what researchers found, and where those ads really come from.
More on YouTube
Dan and Liz answer one everyday tech question at a time, most of them in under a minute.