MMango Oasis
← All Articles
Explainer3 min read

What Is a Cookie (in Web Browsing)?

Browser cookies are small files websites store on your device. Here is what they actually contain, why they exist, and what 'accepting cookies' really means.

M

Mango Oasis Editorial

2026-03-31

A cookie is a small text file that a website stores on your device when you visit. It contains information the site wants to remember — things like whether you are logged in, what is in your shopping cart, or your display preferences. The next time you visit, the site reads that file and picks up where it left off.

Despite the privacy concerns surrounding them, most cookies exist for entirely practical reasons.

Why Cookies Exist

The web is stateless by default. Each page request is technically independent — your browser asks for a page, the server sends it, and the connection closes. The server has no built-in memory of previous requests from you.

Cookies solve this. Without them:

  • You would need to log in on every single page of a website
  • Shopping carts would empty every time you navigated away
  • Sites could not remember your language or theme preferences

Cookies were introduced in 1994 specifically to handle login sessions, and that remains one of their primary uses today.

Types of Cookies

Not all cookies work the same way:

Session cookies exist only while your browser is open. When you close the browser, they are deleted. These handle things like keeping you logged into a site during a visit.

Persistent cookies stay on your device for a set period — days, months, or years. These are what remember your login across visits ("stay signed in") or store your preferences.

First-party cookies are set by the website you are actually visiting. Generally considered less privacy-invasive since they are limited to that site's use.

Third-party cookies are set by external services embedded in the page — most commonly advertising networks. These can track you across many different websites, which is why they are at the center of most privacy debates around cookies.

What "Accept Cookies" Actually Means

The cookie consent banners you see on websites are required by privacy laws in many regions (notably the EU's GDPR). When you click "Accept all," you are consenting to non-essential cookies — primarily third-party tracking and advertising cookies.

Clicking "Reject" or customizing your preferences limits cookies to the functional ones a site needs to operate. Most sites work fine with only essential cookies enabled.

How to Manage Cookies

Every browser allows you to view, delete, and block cookies in its privacy settings. You can:

  • Clear all cookies (which will log you out of most sites)
  • Block third-party cookies specifically (supported natively in most modern browsers)
  • Use private/incognito browsing, which discards all cookies when you close the window

Blocking all cookies entirely will break some websites. Blocking third-party cookies specifically is a reasonable privacy step with minimal practical downside.

Summary

Cookies are small text files websites use to remember information between visits — login sessions, cart contents, and preferences. Most are harmless and necessary. Third-party cookies, used for cross-site tracking and advertising, are the ones privacy laws target. You can manage or delete cookies in your browser settings at any time. For more on browser privacy, see what HTTPS is and what a VPN does.

Found this helpful?

Browse more plain-English explanations of tech and internet terms.

Browse All Articles