# What Are Cookies? Meaning, Definition and Types

Source: https://www.frithx.com/blog/what-are-website-cookies/
Author: Nasif Safwan, Chief Management Officer, FrithX
Published: October 14, 2026, updated 2026-11-23

What is a cookie? A small piece of data a website stores in your browser so it can remember you. Here is the meaning of cookies, why they are called cookies, each type, what "Accept cookies" means, which need consent, and the meaning in Bengali.

## Key takeaways

- Cookies meaning: small text files a website stores in your browser and reads back on later visits, so it can remember you.
- Strictly necessary cookies usually need no consent; analytics and advertising cookies usually do.
- A cookie banner has to hold optional cookies until the visitor chooses, and keep a record of the choice.

## Cookies meaning: what are cookies?

What does cookies mean? Cookies are small text files a website saves in your browser so it can remember you: that you are logged in, what is in your cart, or which language you chose. When a site says "we use cookies", it means it stores and reads these files, and often lets other companies such as analytics and advertising networks do the same. In Bengali the word is the same, কুকি: a small file a website keeps in your browser to remember you.

## What is a cookie? The definition

The web definition: a cookie is a small piece of data a server sends to your browser, which the browser stores and sends back with later requests to the same site. The web is stateless by default, so without cookies every page you load would reach the server as if from a stranger.

Each cookie holds a name, a value, an expiry date and the domain it belongs to. The table below shows what that looks like on a typical shop website.

Cookies are not programs and cannot run code. What makes them a privacy question is what they identify: a unique ID in a cookie lets a site, or a third party embedded in it, recognise the same browser across visits and across other sites.

| Cookie | Set by | Lasts | What it does | Needs consent? |
| --- | --- | --- | --- | --- |
| session ID | the site | until you close the browser | keeps you logged in | No |
| cart | the site | days to weeks | remembers your basket | No |
| consent choice | the cookie banner | months | remembers what you chose | No |
| _ga | Google Analytics | 2 years | tells visits apart to count them | Yes |
| _fbp | Meta pixel | 90 days | measures ads across sites | Yes |

## What do cookies do? What cookies are used for

Cookies let a website remember a browser between page loads and between visits. The browser sends each cookie back to the site that set it, so the site can recognise you without asking again. Almost every use falls into one of four jobs:

- Keeping you signed in: a session cookie holds a random ID that tells the server which account the request belongs to.
- Remembering what you did: the items in a cart, a form half filled in, or the language you picked.
- Counting and measuring: analytics cookies tell visits apart so a site can see how many people came and which pages they read.
- Advertising: ad network cookies recognise the same browser on many sites, to show targeted ads and measure whether they worked.

## Why are they called cookies? Origin of the name

Lou Montulli, an engineer at Netscape, brought cookies to the web in 1994 so that an online shopping cart could remember what a visitor had picked. He named it after "magic cookie", an older programming term for a small piece of data a program receives and later hands back unchanged, and has said he kept "cookie" because he liked how it sounded. Netscape's browser supported cookies later that year, and the standard browsers follow today is [RFC 6265](https://www.rfc-editor.org/rfc/rfc6265), published by the IETF in 2011.

Outside computing, the other meaning of cookies is the everyday one: in American English a cookie is a small, sweet baked biscuit.

## Types of cookies by who sets them and how long they last

Two questions describe any cookie: whose domain set it, and when it expires.

- First-party cookies are set by the site you are visiting, for logins, carts and its own analytics.
- Third-party cookies are set by another domain loaded on the page, such as an ad network, a video embed or a chat widget. Chrome still allows them by default, Safari blocks them by default and Firefox keeps them isolated to each site.
- Session cookies have no expiry date and are deleted when the browsing session ends, although browsers that restore sessions on restart can keep them longer.
- Persistent cookies are deleted on the date set in their Expires attribute or after their Max-Age period, which can be months or years.

## What are third-party cookies?

Third-party cookies are cookies set by a domain other than the one in the address bar, usually because the page loads that domain's ad, pixel, video or chat widget. Because the same third party is embedded on many sites, its cookie lets it recognise one browser across all of them. That cross-site tracking is why they almost always need consent.

First-party cookies, set by the site you are on, do the everyday work of logins, carts and settings. Blocking third-party cookies in your browser stops most cross-site tracking without breaking those.

## Secure, HttpOnly and SameSite cookies

Attributes set alongside a cookie control where it travels and who can read it:

- Secure cookies are only sent over encrypted HTTPS connections, never plain HTTP.
- HttpOnly cookies cannot be read by JavaScript on the page, which helps protect login sessions from cross-site scripting attacks.
- SameSite decides whether a cookie is sent with requests from other sites: Strict, Lax or None, which also requires Secure. Chrome and Edge treat a cookie with no SameSite value as Lax; Safari and Firefox do not apply that default.

## Types of cookies by what they do

Cookie banners group cookies by purpose, because consent rules depend on purpose, not on the file:

- Strictly necessary: security, load balancing, logins and carts. The site breaks without them.
- Preferences: language, region and display settings the visitor chose.
- Analytics: counting visits and measuring how people use the site, such as Google Analytics.
- Marketing and advertising: pixels and IDs that track visitors across sites to target or measure ads, such as the Meta pixel.

## What does "Accept cookies" mean, and is it safe?

Clicking "Accept" or "Accept all cookies" on a banner gives the site permission to set optional cookies, usually analytics and advertising ones, on top of the strictly necessary cookies it uses anyway. Clicking "Reject" should still let you use the site. You can change your mind later from the site's privacy settings, or by clearing cookies in your browser.

Should you accept cookies? Cookies cannot run code or install anything, so accepting is not a security risk in itself. But optional cookies let companies follow your browsing across sites. Accept the ones you are comfortable with, and reject advertising cookies if you would rather not be tracked.

## Trackers that are not cookies

Local storage, tracking pixels, SDKs and browser fingerprinting do the same job without a cookie file. Consent rules care about the data, not the storage method: the EU's ePrivacy rules cover storing or reading any information on a visitor's device, and data protection laws cover any personal data collected. A cookie banner that only knows about cookies misses half of what a modern site loads.

## When cookies need consent

In the EU and UK, cookies that are not strictly necessary need consent before they are set, and GDPR defines valid consent as freely given, specific, informed and unambiguous. In California, CCPA gives people the right to opt out of their data being sold or shared, and cookies used for cross-site advertising usually count as sharing. In Bangladesh, the [Bangladesh PDPA 2026](https://www.frithx.com/bd/) (Personal Data Protection Act, 2026) requires consent that is voluntary, specific, clear and withdrawable before personal data is processed, unless another lawful basis applies (s.5).

The practical rule is the same in all three: analytics and advertising cookies should wait for a choice, and strictly necessary ones can load straight away.

## What a cookie banner and cookie policy should do

A cookie banner, or consent banner, is the control; the cookie policy is the explanation. Between them they should:

- Hold every optional cookie and tracker until the visitor chooses.
- Make rejecting as easy as accepting, with choices per purpose.
- Link to a cookie or privacy policy listing what is set, by whom and for how long.
- Let visitors change their mind later from a link that stays on the page.
- Keep a record of each choice: when, what, which banner version and which law applied.

## Cookies meaning in Bengali (কুকি মানে কী?)

কুকি (Cookie) হলো ছোট একটি টেক্সট ফাইল, যা কোনো ওয়েবসাইট আপনার ব্রাউজারে সংরক্ষণ করে, যাতে সাইটটি আপনাকে মনে রাখতে পারে: আপনি লগইন করা আছেন কি না, কার্টে কী আছে, বা কোন ভাষা বেছে নিয়েছেন। অ্যানালিটিক্স ও বিজ্ঞাপনের কুকি দিয়ে বিভিন্ন কোম্পানি আপনার ব্রাউজিং অনুসরণ করতে পারে, তাই অনেক ওয়েবসাইট আগে আপনার অনুমতি চায়।

কুকি কয়েক ধরনের: অপরিহার্য কুকি (লগইন, কার্ট, নিরাপত্তা) ছাড়া সাইট চলে না; পছন্দের কুকি ভাষা বা অঞ্চল মনে রাখে; অ্যানালিটিক্স কুকি ভিজিট গোনে; আর বিজ্ঞাপনের কুকি বিভিন্ন সাইটে আপনাকে অনুসরণ করে বিজ্ঞাপন দেখায়।

"Accept cookies" মানে আপনি সাইটকে এসব ঐচ্ছিক কুকি ব্যবহারের অনুমতি দিচ্ছেন। বাংলাদেশের ব্যক্তিগত উপাত্ত সুরক্ষা আইন, ২০২৬ অনুযায়ী ব্যক্তিগত উপাত্ত প্রক্রিয়াকরণের জন্য সাধারণত উপাত্তধারীর স্বেচ্ছাধীন, সুনির্দিষ্ট, স্পষ্ট ও প্রত্যাহারযোগ্য সম্মতি লাগে (ধারা ৫)।

## How to clear or block cookies

Clearing cookies signs you out of most sites and resets their saved settings. The menu names below are current at the time of writing and move between browser versions:

- Chrome on a computer: Settings, then Privacy and security, then Delete browsing data, and tick "Cookies and other site data". Third-party cookies can be blocked under Privacy and security as well.
- Chrome on Android: the three-dot menu, then Delete browsing data, then "Cookies and site data".
- Safari on iPhone: Settings, then Safari (Apps, then Safari on newer iOS), then Clear History and Website Data. To remove cookies only, use Advanced, then Website Data.
- To remove one site's cookies, open the site, tap the icon left of the address and choose its cookie or site settings.

## Cookie consent tools for Bangladeshi websites

FrithX is a cookie consent and privacy compliance platform built for [Bangladesh's Personal Data Protection Act, 2026](https://www.frithx.com/bd/). Its [Consent Cloud](https://www.frithx.com/product/consent-cloud/) shows an opt-in banner, in Bangla if you choose, holds tagged trackers until the visitor answers, and keeps a log of every choice as the proof of consent the Act asks for (s.5(4)).

Whichever tool you use, check four things: it blocks optional trackers before the visitor chooses, rejecting is as easy as accepting, the banner can be shown in Bangla, and every choice is logged with its time, banner version and the law that applied.

## See which cookies your own site sets

Most sites set more cookies than their owners know about, because plugins and marketing tools add them without a code change. The [free FrithX privacy scan](https://www.frithx.com/tools/privacy-scan/) loads your site the way a first-time visitor does and lists every cookie and tracker it sets, in under a minute, with no sign-up.

## Frequently asked questions

### Is it safe to accept cookies?

Cookies cannot run code or install anything, so accepting them is not a security risk in itself. Optional cookies do let companies follow your browsing across sites, so accept the ones you are comfortable with and reject advertising cookies if you would rather not be tracked.

### What happens if I reject cookies?

The site should still work. Strictly necessary cookies, such as login and cart cookies, keep running; analytics and advertising cookies should not be set. You may see the banner again later, and some sites show less personalised content.

### Are cookies a virus?

No. A cookie is a small text file the browser stores. It cannot run code, read your files or spread to other devices.

### What are cookies on a computer?

They are the same cookies: small text files your web browser saves on the computer for each site you visit. They live inside the browser, not elsewhere on the computer, so each browser keeps its own set and clearing them in one browser leaves the others untouched.

### Should you delete cookies?

Deleting cookies now and then removes tracking IDs and frees a little space, but it also signs you out of sites and resets their settings. Many people delete third-party cookies or block them in the browser and keep first-party ones, so logins and carts keep working.

### Do cookies store my password?

A well-built site never stores your password in a cookie. It stores a random session ID instead, which is why a stolen session cookie can still let someone into your account until it expires or you log out.

### কুকি মানে কী?

কুকি হলো ছোট একটি টেক্সট ফাইল, যা ওয়েবসাইট আপনার ব্রাউজারে রাখে যাতে আপনাকে মনে রাখতে পারে: লগইন, কার্ট বা ভাষা। অ্যানালিটিক্স ও বিজ্ঞাপনের কুকির জন্য সাধারণত আপনার সম্মতি লাগে।
