Cookie consent banners sit on a large share of the web, and many people building websites—not just visitors—are hazy on why they exist. Emily Stewart's explainer rounds up the answer: it's largely a bet that annoying some users is preferable to being sued out of existence.

No single regulation drives this. GDPR is the headline one, though it barely mentions cookies, and a mix of existing and likely-upcoming rules pushes sites toward these prompts.

What "Remember me?" actually does

Session handling is one place cookies are genuinely essential. Most sites store your logged-in session in a cookie, and cookies carry expiration dates. Checking "Remember me?" simply gives that cookie a longer expiration than it would otherwise have.

The non-essential cookies behind the banner

A site can end up illegal in Europe without ever intending to track anyone. Take a site that runs display ads and, at advertiser request, embeds an image like <img src="pixel.gif"> to count impressions. That image can and does set a cookie, and may do more than track impressions, such as attempt to serve targeted ads. Because those cookies are "non-essential"—unlike a login cookie—the site is required to ask for consent.

The requirement goes further than displaying UI. Before a visitor answers, or if they decline, the tracking pixels shouldn't be loaded at all, since the site can't control whether they set a cookie. Doing that without JavaScript is even more involved. Three ironies follow:

  • Many sites that show consent banners never implement the opt-in, leaving the UI useless.
  • Implementing consent properly likely requires cookies of its own, which must then be disclosed.
  • What counts isn't the banner's presence but actually withholding cookies until consent is given.

So far enforcement has come from individual lawyers bringing cases on people's behalf rather than governments, though that may well grow.

The alternative: drop the third-party cookies

A stronger motivation than legal risk is simply doing the right thing: if you're going to place a cookie on someone's computer, tell them what it's for and ask first. That leaves a choice between building consent UI—difficult to program, technical debt to maintain, and annoying to users—and removing everything that sets a third-party cookie. The latter is the road to try first.

The practical question raised: existing "Remember me?" checkboxes work by extending session cookie lifetimes, while any ad pixel capable of setting a cookie is the piece that triggers consent obligations in the first place.