Safe Browsing and Downloads

Cookies and Trackers Explained

A plain explanation of what cookies and trackers are, how first-party and third-party cookies differ, and which controls your browser offers to manage them.

On this page
  1. What a cookie is
  2. First-party and third-party cookies
  3. Session and persistent cookies
  4. Other ways of tracking
  5. Why tracking matters
  6. Cookie banners and consent
  7. Controls your browser offers
  8. What private browsing changes
  9. Practical habits
  10. A realistic expectation

A web cookie is a small piece of text that a website asks your browser to store. When you return, or move to another page of the same site, the browser sends that text back. This gives the site a simple form of memory. Without it, a website would treat every page request as coming from a stranger.

Some uses are plainly helpful. Cookies keep you signed in while you move around a site, remember what is in your shopping basket and store preferences such as language or text size. Others are less obvious, and that is where privacy questions come in.

First-party and third-party cookies

A first-party cookie is set by the site you are visiting. It usually supports the features you can see, such as staying logged in.

A third-party cookie is set by a different domain whose content is embedded in the page, for example an advertising service, a video player or a social button. Because the same outside service can appear on many sites, its cookies can help it recognize the same browser across all of them. That is how a company can build a picture of the pages you visit and your apparent interests.

Browsers have been tightening how third-party cookies work, and the details differ between browsers and change over time, so it is best to check what your own browser does rather than assume.

Session and persistent cookies

Session cookies disappear when you close the browser. Persistent cookies stay for a set period, from days to years. Persistent cookies are what allow “remember me” features, and they are also how long-term tracking works. A site can still follow you for the length of your visit with a session cookie, but persistent ones create a longer history.

Other ways of tracking

Cookies are not the only method. Sites and advertisers can also use:

  • Small invisible images or scripts, often called pixels, that report when a page or email is opened.
  • Browser fingerprinting, which combines details such as screen size, fonts and settings to recognize a device without storing anything on it.
  • Account sign-ins, where activity is linked to a name or email address you provided.

This is why clearing cookies helps but does not erase every trace. It is one control among several, and your wider digital footprint includes data held by the sites themselves.

Why tracking matters

For many people the concern is not any single cookie but the combined profile. That profile can be used to show tailored ads, adjust what you see or share assumptions about you with other companies. For most people this is more a privacy and annoyance issue than a security one. Still, data that is collected can be leaked, sold or misused, and the less that is collected, the less can go wrong.

Cookies also have a security side. A cookie that keeps you signed in works like a temporary key. If someone steals it, they may be able to use your session. This is one reason to log out on shared devices and to be careful about unknown extensions that can read your browsing.

Many sites show a banner asking you to accept cookies. In some regions, laws require sites to ask before using non-essential cookies. The usual choices are accept all, reject all or manage preferences. Here are some sensible habits:

  • Look for a clearly labeled option to reject non-essential cookies, and choose it if you do not want tailored tracking.
  • Be wary of banners that make rejection hard to find. That design is common but does not change your options.
  • Remember that rejecting optional cookies rarely stops a site from working, though some features may be reduced.

Fake banners also exist. A prompt in the middle of a page that urges you to download something to “update” your cookies is not a real consent notice.

Controls your browser offers

Settings screens change, so look for the general category rather than a fixed menu path. Most major browsers let you:

  • View and delete stored cookies and site data, either all of it or for specific sites.
  • Block third-party cookies, or block them only in certain modes.
  • Clear cookies automatically when you close the browser.
  • Allow or block cookies for individual sites.
  • Send a signal asking sites not to track you. Sites are not always required to honor it, so treat it as a request.

Be aware that blocking everything can break sign-ins and shopping baskets. Many people find a middle path works well: block third-party cookies, allow first-party ones and clear data occasionally.

What private browsing changes

Private windows usually start with no stored cookies and discard new ones when closed. That limits tracking across sessions on your own device, but sites still see your visit while it lasts, and your internet provider and network can still see the connection. Our look at what private browsing mode really hides goes into the details.

Practical habits

  1. Check your browser’s cookie settings once and choose a level you are comfortable with.
  2. Delete cookies and site data from time to time, especially on shared devices.
  3. Review the permissions you have granted, since app permissions and site permissions work alongside cookies.
  4. Be careful with extensions that claim to manage tracking, and choose them with the same care as any other add-on.
  5. Log out of accounts you do not use daily, and log out completely on public computers.

A realistic expectation

You cannot become invisible online. The aim is to understand what is collected and reduce the unnecessary parts.

This article gives general information only. Laws, browser behavior and settings differ by region and version, so check the current options in your own browser.

The complete guide to safe browsing and downloads

Safe Web Browsing Habits for Everyday Users
Read the guide

Keep exploring

Guides from other topics

All topics →