What Are Browser Cookies? How Sites Remember Carts, Logins, and Language

Learn what HTTP cookies are, how Chrome and Safari store tiny 4 KB preference/session tokens, and the GDPR line between essential and marketing cookies.

What Are Browser Cookies? HTTP Cookies & Privacy Explained — OnDiso Cover
Direct Answer

A browser cookie (HTTP cookie) is a small 4 KB key-value text note stored inside your browser by websites you visit. Cookies preserve login sessions, language choices, and shopping carts across clicks—while optional analytics and marketing tracking cookies require explicit GDPR consent before firing.

Under GDPR and KVKK rules, browser cookies split clearly by purpose:

Three cookie categories: Strictly Necessary, Preference, and Consent-Required Analytics/Marketing
Only strictly necessary security/session cookies run without a prior opt-in consent banner

Connecting Cookies Securely to Backend Sessions

Safe web apps never store raw passwords or permissions in browser cookies; instead, they pair an HttpOnly; Secure session identifier over HTTPS with server-side Web Sessions.

Frequently Asked Questions

Are HTTP cookies viruses or executable programs?

No—cookies are plain text pairs incapable of running code or reading unrelated files on your device.

What does HttpOnly mean on a security cookie?

It instructs browsers to block JavaScript from accessing that token, defending login sessions against XSS scripts.

What is the difference between first-party and third-party cookies?

First-party cookies are set by the domain you directly visit to keep you logged in or save preferences, while third-party cookies are placed by external ad or analytics domains.

What happens when a user clears browser cookies?

Active logins expire and saved preferences like language or cart items reset, though server-side account records remain intact.

Do all websites legally need a cookie consent banner?

Sites using only strictly necessary functional cookies generally do not need marketing consent banners, whereas non-essential analytics or ad trackers require opt-in consent under GDPR and KVKK.

what are browser cookies first party vs third party cookies gdpr cookie compliance
Next step

Let's plan your project together

Corporate web engineering, e-commerce, custom SaaS, business email plans, or technical SEO — tell us what you are building.

Get in touch