By Ines Duarte ·

Why Does Every Website Ask for Cookies?

You land on a new site, and before you can read a single sentence, a gray bar covers the bottom of your screen asking you to accept cookies. You click something, anything, just to make it go away.

If you have ever wondered why does every website ask for cookies, the honest answer has nothing to do with manners. It is not a courtesy popup some designer dreamed up. It is the visible edge of a law that has existed since 2009, was sharpened by a European court ruling in 2019, and has been backed by real fines ever since.

A cookie, in case the word still feels vague, is a small text note a website asks your browser to hold onto. Think of it as a claim ticket at a coat check: the site hands you a numbered stub so it can recognize you when you come back, whether that means keeping you logged in or remembering what is sitting in your shopping basket. The law does not much care what the note says. It cares that something is being placed on your device at all, and that single fact is where the banner comes from.

The Law That Started It All Back in 2009

Long before GDPR became a household acronym, the European Union passed a rule that is easy to miss because nobody talks about it much. In 2009, an amendment to the ePrivacy Directive (Directive 2009/136/EC, updating Article 5(3) of the original 2002 text) said that storing information on a user's device, or reading information already stored there, requires the user's consent, given after they have been told clearly what is happening. EU member states had until May 2011 to write that into national law.

There is an exception built into the same rule, and it matters: cookies that are strictly necessary to provide a service the user actually asked for, keeping you logged in during a session, remembering what is in your cart, do not need a popup at all. That distinction is why some sites show a light-touch banner and others show a wall you cannot click past. The necessary cookies keep the site functioning; everything else, analytics, advertising, social media widgets, needs your yes first.

GDPR and the Planet49 case turned up the volume

The ePrivacy rule existed for nearly a decade with patchy enforcement. Two things changed that. First, the General Data Protection Regulation took effect on 25 May 2018 and redefined what "consent" legally means: it has to be freely given, specific, informed, and given through a clear affirmative action (GDPR Articles 4(11) and 7). Second, and more decisive for what your banner looks like today, the Court of Justice of the European Union ruled on a German case called Planet49 on 1 October 2019.

The case involved a pre-ticked checkbox for a lottery signup. The court said a checkbox that is already ticked for you is not valid consent, full stop, regardless of whether the cookies involved collect anything you would call personal information. The user has to check the box themselves.

That single ruling is why unticked boxes and visible reject options became standard almost overnight, according to the Court's official press release on the case. It also confirmed that the rule reaches further than cookies alone. The European Data Protection Board's Guidelines 2/2023, finalized in October 2024, spell out that the same consent requirement covers tracking pixels, local storage, and device fingerprinting, not just the file sitting in your cookie jar.

Why a blog in Ohio shows you an EU banner

Here is the part that trips people up the most, judging by the questions readers send me. GDPR applies to any organization that offers goods or services to, or monitors the behavior of, people located in the EU (Article 3(2)). It does not matter where the company itself is based. A food blog run from Ohio that uses Google Analytics and has even a handful of EU readers is, technically, in scope.

Sorting visitors by location before deciding whether to show a banner is a real engineering job. Showing the same banner to everyone is a five-minute plugin install. Given that choice, most site owners pick the second option, which is the actual reason the banner follows you around the web regardless of where you live.

Worth knowing too: US privacy law runs the opposite direction. California's CCPA and CPRA do not require a consent banner at all; they require an opt-out link and recognition of browser-level opt-out signals.

EU law asks first. US law lets you leave later. If you run a site and want the compliance side spelled out step by step rather than the visitor-facing side, our guide to what GDPR actually requires of a site owner covers the practical checklist.

What it means to accept cookies on a website

So what happens when you accept cookies on a website? Practically, one click flips a switch inside the site's consent tool. Every cookie category the site has grouped as optional, analytics, advertising, social media embeds, session recording tools, gets switched on, and the scripts behind them are allowed to run.

Those scripts then set their own third-party cookies, often belonging to companies you never visited directly and may not recognize by name. Each one arrives in your browser the same way a first-party cookie does, as a Set-Cookie response header (our sister site's breakdown of what each HTTP response header does is a useful primer if headers are new territory for you).

Your acceptance gets recorded too, usually in a first-party cookie the consent tool drops on the spot. Two of the most common consent platforms illustrate this well: Cookiebot's record is named CookieConsent and, by Cookiebot's own documentation, holds your choice for up to twelve months by default. OneTrust's equivalent is called OptanonConsent.

That detail answers a question people ask without realizing there is a clean answer: why does the banner keep coming back? It reappears once that consent cookie expires, once you clear your cookies, or whenever you open the site in a private or incognito window, since a private window starts with no memory of you at all.

What happens if you reject cookies

Rejecting is meant to mirror accepting, and on a properly built site, it does. Only the strictly necessary cookies stay active: your login session, your basket, security tokens, and, a little ironically, the cookie that records your rejection. The site keeps working. You might lose small things, a saved language preference that resets, or find yourself logged out sooner than expected, but nothing that stops you from using the page.

That is the theory. In practice, it does not always play out that way, and I would rather say that plainly than let you assume the button is a guaranteed off switch.

A 2024 study presented at USENIX Security, which automatically crawled roughly 97,000 sites popular in the EU, found that 65.4% of sites offering a rejection option appeared to keep collecting data anyway after the user rejected. Rejecting lowers your odds of being tracked. It does not guarantee it.

Closing the banner without clicking anything, or scrolling past it and ignoring it entirely, is legally treated the same as rejecting: no clear affirmative action was taken, so no consent exists, and a compliant site is supposed to behave as if you said no. Whether the site you are actually on does that is a separate question, which is part of why checking a site's cookies from the outside is worth more than trusting the banner's word for it.

Accept, reject, or ignore: what actually changes

The differences are easiest to see side by side, especially once you know that tracking cookies do not always respect the answer you gave.

Your actionWhat loadsWhat gets storedHow long it is remembered
Accept allEvery optional category: analytics, advertising, social widgets, and similar scriptsThird-party cookies from each enabled category, plus a first-party consent recordVaries by cookie; advertising cookies often run up to two years, while the consent record itself is typically around 12 months
Reject allOnly strictly necessary scripts: login, basket, securitySession and security cookies, plus a first-party consent record of your refusalSession cookies last until you close the browser or log out; the consent record lasts around 12 months, the same as an acceptance
Close or ignore the bannerLegally, nothing optional should load; in practice, on many sites, tracking scripts load anywayDepends on the site's honesty; a compliant site stores nothing beyond necessary cookiesNo consent record is created, so the banner reappears on your next visit

Why the reject button is so hard to find

If you have ever hunted for a reject option buried three menus deep behind "Manage Preferences," that was not an accident. Researchers at CHI 2020 scraped 680 consent popups across the UK's most visited sites and found that removing the reject option from the first screen raised the acceptance rate by 22 to 23 percentage points, while offering granular category controls upfront lowered it by 8 to 20 points (Nouwens et al., "Dark Patterns after the GDPR," CHI 2020). Hiding reject worked, in the plainest sense, so a lot of sites did it.

Regulators eventually caught up. France's data protection authority, the CNIL, and the UK's Information Commissioner's Office have both taken enforcement action against exactly this pattern: one click to accept, several clicks to refuse. The standard both regulators point back to is the same one the CJEU set in Planet49, rejecting has to be genuinely as easy as accepting, not technically possible but buried three menus deep. If you want to see what a banner that actually clears that bar looks like, our roundup of cookie consent banner examples that comply walks through several.

Do all websites need a cookie warning?

No, and this surprises people. A site only needs consent for cookies that are not strictly necessary to run the service you asked for. A plain personal blog with no analytics, no ad network, and no embedded social widgets is not storing anything that requires your opt-in, so it does not need a website cookies warning at all. The moment that same blog installs Google Analytics or an Instagram embed, the picture changes, because those add non-essential tracking that the law says needs your consent first.

This is also the practical test cookiecheck.tools applies when it scans a page: if a site sets no optional cookies and loads no third-party trackers, the report flags it as not needing a consent tool rather than penalizing it for the absence of one. A missing banner is not automatically a red flag. Sometimes it just means the site genuinely has nothing to ask permission for.

Will cookie banners ever go away?

Probably not soon, despite a few headlines that suggested otherwise. Google confirmed in an October 2025 Privacy Sandbox update that Chrome will keep its current approach to third-party cookie choice rather than force a phase-out, retiring several of the original replacement APIs, Protected Audience and Topics among them, for low adoption instead. Safari and Firefox already block third-party cookies by default, but Chrome is still the browser most people use, so that decision keeps the current banner-based system in place rather than replacing it.

There is a live legislative effort worth watching. The European Commission's proposed Digital Omnibus, published in November 2025, would fold cookie rules into GDPR and originally included a clause letting people set their cookie preferences once, at the browser or operating system level, for every site to respect.

In June 2026, the Council of the EU dropped that browser-signal clause from its negotiating position after pushback from publishers and the advertising industry. As of this writing, in September 2026, the proposal is still moving through trilogue negotiations between the Commission, Council, and Parliament. Nothing is finalized, so treat any claim about exactly when banners will simplify as speculation for now.

See what a website actually sets

Reading about consent rules is one thing. Seeing what a specific site actually does is another, and that gap is exactly what cookiecheck.tools was built to close. Paste in a URL and the cookie checker fetches the page the way a browser would on first load, before you click anything, and reports every cookie the server set, which third-party hosts are wired in, and whether a recognized consent platform is present at all. There is a second tab for checking your own browser's storage after you have clicked through a banner yourself, which catches anything set by JavaScript after the fact.

One honest limit worth stating up front: a single fetch cannot see cookies that get written later by a script bundle or a tag manager after you interact with the page. That is why the report treats a missing consent tool as a warning rather than a verdict, and why the browser tab exists right alongside the URL check.

Frequently Asked Questions

Why does every website ask me to accept cookies?

Because EU law (the ePrivacy Directive, tightened by GDPR and the 2019 Planet49 court ruling) requires a site to get your consent before storing anything on your device beyond what is strictly necessary to run the service. Since GDPR applies to any site with EU visitors regardless of where the company is based, and sorting visitors by location is expensive, most sites find it simpler to show the same banner to everyone.

What happens if I accept cookies?

Accepting switches on the optional cookie categories the site has defined, typically analytics, advertising, and social media widgets, and lets the scripts behind them run and set their own cookies. Your choice itself gets saved in a first-party consent cookie, usually for around 12 months, which is why the banner does not reappear every time you visit until that record expires or you clear your cookies.

What happens if I reject cookies?

On a properly built site, only strictly necessary cookies remain active, your login, your basket, and security tokens, and the page keeps working normally, though you may lose small conveniences like a saved language preference. Your rejection is also stored so the banner does not ask again immediately. The one caveat worth knowing: a 2024 USENIX study found that roughly two-thirds of sites offering a reject option appeared to keep collecting data anyway, so rejecting reduces tracking rather than eliminating it with certainty.

Do all websites need a cookie warning?

No. Only sites that store cookies or similar data beyond what is strictly necessary to deliver the service need to ask for consent first. A site with no analytics, no advertising scripts, and no embedded third-party widgets has nothing non-essential to ask permission for, so a missing banner on a simple site is not automatically a compliance problem.