Guides

A Practical Guide to Cookie Rules

Taras Shynkarenko
Taras Shynkarenko
•Updated: •6 min read
A Practical Guide to cookie rulesA Practical Guide to cookie rules

TL;DR, Quick Answer

6 min read

Internet cookies can support essential website functions or enable invasive tracking. The privacy risk depends on purpose, duration, access, sharing, and whether users have a genuine choice.

Cookie rules exist because a small browser file can do very different jobs. One cookie can keep a user logged in. Another can follow that user across thousands of websites for advertising. Treating both as "just cookies" misses the privacy issue.

An internet cookie is a small piece of data stored by the browser for a website. When the browser later requests a page or resource from the same domain, it can send the cookie back. That lets websites remember sessions, preferences, carts, consent choices, and identifiers.

Main Types of Cookies

First-party cookies are set by the site the visitor is using. They can support login, shopping carts, preferences, analytics, or product state.

Third-party cookies are set by another domain embedded on the page, such as an ad network, social plugin, or analytics provider. These are often used for cross-site tracking.

Session cookies expire when the browser session ends. Persistent cookies remain until a set expiry date or deletion.

Essential cookies are necessary for a service requested by the user, such as authentication, security, load balancing, or a shopping cart. Non-essential cookies support analytics, advertising, personalization, or other optional purposes.

Secure, HttpOnly, and SameSite attributes are security controls. They affect how cookies are transmitted and accessed, but they do not make a tracking purpose privacy-friendly by themselves.

Why Cookies Became Controversial

Cookies are not inherently bad. The controversy comes from persistent identification and cross-site tracking.

A third-party advertising cookie can recognize the same browser on many sites. Over time, that can reveal interests, habits, purchases, health concerns, political reading, location patterns, and life events. Even first-party cookies can be risky if third-party scripts write or read them for profiling.

Browsers have responded. Safari's WebKit has tracking prevention features and blocks third-party cookies by default in modern contexts (WebKit). Firefox's Total Cookie Protection isolates cookies by site to reduce cross-site tracking (Mozilla).

Chrome is different from Safari and Firefox. Google no longer plans the same full third-party cookie phase-out prompt it previously discussed; in April 2025 it said Chrome would maintain the current user-choice approach in Privacy and Security settings (Privacy Sandbox update). That does not make third-party tracking durable. It means Chrome remains more dependent on user settings, consent, platform policy, and future privacy changes while Safari and Firefox already restrict cross-site tracking more aggressively by default.

Third-party cookie defaults by browser
Safari (WebKit)
  • Blocks third-party cookies by default in modern contexts
Firefox
  • Total Cookie Protection isolates cookies by site
Chrome
  • Keeps the current user-choice approach in Privacy and Security settings
Safari and Firefox restrict cross-site tracking by default; Chrome still depends on user settings.

A person reviews a website on a laptop, next to the section on cookie consent rules.

In the EU and UK, cookie rules come mainly from ePrivacy laws, with GDPR setting the standard for consent when personal data is involved. The key principle is that storing or accessing information on a user's device requires consent unless it is strictly necessary for the requested service.

The UK ICO says organisations need a consent mechanism that lets users control non-essential cookies and similar technologies (ICO). The EDPB explains GDPR consent as freely given, specific, informed, and unambiguous, with free withdrawal later (EDPB).

That means a compliant cookie banner should not:

Flowsery
Flowsery

Start Your 14-Day Free Trial

Real-time dashboard

Goal tracking

Cookie-free tracking

  • Set optional cookies before consent.
  • Use pre-ticked boxes.
  • Make "accept" much easier than "reject."
  • Bundle analytics and advertising into one vague choice.
  • Hide withdrawal.
  • Describe tracking with unclear language.

Analytics Cookies

Analytics cookies are non-essential under most consent rules, because the website can function without them. Some regulators allow narrow exemptions for audience measurement when strict conditions are met, such as first-party limited measurement, short retention, no cross-site tracking, and no sharing for other purposes. CNIL describes such conditions for audience measurement tools (CNIL).

Most mainstream analytics and advertising setups do not automatically qualify for those exemptions. If analytics data is shared with a third-party ecosystem or used for advertising, consent and disclosure obligations increase.

When analytics cookies need consent
Audience measurement
Shared with a third-party ecosystem
Used for advertising
Consent and disclosure required
Consent and disclosure obligations grow as analytics data moves from narrow first-party measurement toward sharing and advertising use.

What Website Owners Should Audit

Create a cookie and tracking inventory:

  • Cookie name.
  • Provider.
  • Domain.
  • Purpose.
  • Expiry.
  • Whether it is essential.
  • Whether personal data is involved.
  • Whether data is shared with third parties.
  • Whether consent is required.
  • How users can withdraw.

Then check the website in a fresh browser session before accepting the banner. Optional cookies should not appear before the user has made a valid choice.

Cookieless Does Not Automatically Mean Private

Some tracking systems avoid cookies but use local storage, pixels, fingerprinting, server-side identifiers, or hashed emails. Cookie law can cover similar technologies, and privacy law can still apply when data relates to an identifiable person.

A genuinely privacy-first approach avoids replacing cookies with sneakier identifiers. It uses aggregate measurement, data minimisation, short retention, and no cross-site profiling.

Cookies are a tool. The real question is whether your website uses them for something visitors reasonably expect and can control.

A developer works at a dual-monitor desk, next to the section on running a quick browser audit.

A quick browser audit

You can learn a lot without special tools. Open the site in a private window, clear storage, and load the homepage before interacting with the banner. In developer tools, check Application storage for cookies, localStorage, and sessionStorage. Then check Network for calls to analytics, ad, heatmap, chat, and tag-manager domains.

Repeat the test after rejecting optional cookies and after accepting them. The difference should match the banner categories. If advertising calls happen before consent, or if rejection still leaves persistent analytics identifiers, the banner is not controlling the implementation. Keep screenshots and request logs with your cookie inventory. They are better evidence than a spreadsheet filled from vendor marketing pages.

For each cookie or similar technology, record:

  • Name, domain, provider, purpose, expiry, and category.
  • Whether it is first-party or third-party in context.
  • Whether it supports a requested service or an optional purpose.
  • Whether similar storage exists in localStorage, sessionStorage, pixels, SDKs, or link decoration.
  • Whether Safari, Firefox, Chrome regular mode, and Chrome Incognito behave differently.
  • Whether consent rejection actually prevents optional storage and requests.

If the tool claims an analytics exemption, document the exact configuration: limited audience-measurement purpose, no cross-site tracking, no advertising reuse, short retention, clear user information, and no vendor repurposing beyond the publisher's measurement need.

Frequently Asked Questions

A first-party cookie is set by the site the visitor is using and supports things like login, shopping carts, and preferences. A third-party cookie is set by another domain embedded on the page, such as an ad network or social plugin, and is often used for cross-site tracking.

How are session cookies different from persistent cookies?

A session cookie expires when the browser session ends, so it disappears once the tab or browser closes. A persistent cookie stays on the device until a set expiry date arrives or the user deletes it.

Essential cookies that are strictly necessary for a requested service, such as authentication, security, load balancing, or a shopping cart, do not require consent. Non-essential cookies, including analytics, advertising, and personalization, need a valid opt-in before they are set.

Flowsery
Flowsery

Start Your 14-Day Free Trial

Real-time dashboard

Goal tracking

Cookie-free tracking

A banner fails the standard when it sets optional cookies before consent, uses pre-ticked boxes, or makes accepting much easier than rejecting. It also fails when it bundles analytics and advertising into one vague choice, hides how to withdraw consent, or describes tracking in unclear language.

Some regulators allow narrow exemptions for audience measurement when strict conditions are met, such as first-party limited measurement, short retention, no cross-site tracking, and no sharing for other purposes. CNIL describes conditions like these for audience measurement tools. Most mainstream analytics and advertising setups do not qualify for that exemption automatically.

Secure, HttpOnly, and SameSite are security controls that affect how a cookie is transmitted and accessed. They do not change what the cookie is used for, so a tracking cookie with all three attributes set is still a tracking cookie.

What did Chrome decide about third-party cookies in April 2025?

Google said Chrome would keep its current user-choice approach in Privacy and Security settings rather than push through the fuller third-party cookie phase-out it had previously discussed. Chrome stays more dependent on user settings, consent, and platform policy than Safari or Firefox, which already restrict cross-site tracking more aggressively by default.

Can websites track visitors without using cookies?

Yes, some tracking systems rely on local storage, pixels, fingerprinting, server-side identifiers, or hashed emails instead of cookies. Cookie law can still cover similar technologies, and privacy law can apply whenever the data relates to an identifiable person.

A useful inventory lists the cookie name, provider, domain, purpose, and expiry for every cookie in use. It also records whether the cookie is essential, involves personal data, is shared with third parties, requires consent, and how a user can withdraw that consent.

Open the site in a private window, clear storage, and load the homepage before touching the banner. Then check Application storage and the Network tab for calls to analytics, ad, heatmap, chat, and tag-manager domains. Repeat the test after rejecting optional cookies and again after accepting them. If advertising calls happen before consent, or rejection still leaves persistent analytics identifiers, the banner is not controlling what the site actually does.

Was This Article Helpful?

Let us know what you think!

See us more often in Google

One click marks Flowsery as a preferred source, so our articles sit higher in your Top Stories, AI Mode, and AI Overviews.

Before you go...

Flowsery

Flowsery

Revenue-first analytics for your website

Track every visitor, source, and conversion in real time. Simple, powerful, and cookie-free.

Real-time dashboard

Goal tracking

Cookie-free tracking

Related Articles