Types of Computer Cookies

Understand the difference between session cookies and persistent cookies.
We receive compensation from the products and services mentioned in this story, but the opinions are the author's own. Compensation may impact where offers appear. We have not included all available products or offers. Learn more about how we make money and our editorial policies.

Cookies are very small — and occasionally encrypted — files that get stored on your browser as you surf the web. While there are a variety of ways to characterize and group computer cookies, this article focuses on four: first-party, third-party, session, and persistent cookies. 

Read on to find the key identifying details of each kind of cookie.

In this article
First-party cookies
Third-party cookies
Session cookies
Persistent cookies
Bottom line

First-party cookies

These cookies come from websites that you directly visit in your browser. They're used to improve your online user experience of each particular website. First-party cookies often store information relevant to the website you're visiting, such as what you’ve viewed in the past or your settings preferences.

As long as you are visiting authentic and reputable websites, first-party cookies are usually harmless and make it easier to browse your favorite websites. They do, however, track your activity on that website only

Some examples of first-party cookies include: log-in information autofill, shopping cart's contents, and language preferences.

Third-party cookies

You've probably heard of the most controversial type of cookie in terms of data privacy. Third-party cookies usually track your behavior for advertising purposes, and they can even follow users across websites. 

Unlike first-party cookies, third-party cookies often aren't even due to the website you're visiting. Instead, they’re usually embedded in ads, videos, or banners. A good example of a third-party cookie is seeing recurring clothing ads after browsing.

Even clicking the Facebook "like" button uses third-party cookies.

Session cookies

Session cookies are temporary cookie files, which are erased when you close your browser. When you restart your browser and go back to the site that created the cookie, the website will not recognize you, and you'll have to log back in (if login is required) or select your preferences/themes again if the site uses these features. 

This sums up the need for session cookies: they greatly speed up your time online.

If you do revisit that same website, a new session cookie will be generated, which will store your browsing information and will be active until you leave the site and close your browser. 

Session cookies enable you to add an item to your shopping cart, browse multiple other pages, and then still keep track of your item in your cart. They are one of the most common types of cookies. 

Persistent cookies

Persistent cookies track you, collecting your information at every website. These cookies let websites remember if you're logged in and under which account. Persistent cookies also build a profile based on your search history. in order to recommend products, services, or content.

Persistent cookies stay in one of your browser's subfolders until you delete them manually or your browser deletes them based on the duration period contained within the persistent cookie's file. Persistent cookies typically have expiration dates.

Bottom line

While some cookies are downright helpful at optimizing your browsing experience, others are annoying or even harmful. A convenient way to help manage your cookies is by using a top ad blocker that helps stop tracking cookies.

Here are our favorite ad blockers:

Ad blocker
Best for Best for blocking YouTube ads Best for streaming Best overall
Price Paid plan costs $1.59/mo (billed annually) Paid plans start at $1.99/mo (billed every two years) Starts at $3.59/mo (billed every two years)
Blocks YouTube ads
Learn more Get Total Adblock Get Surfshark CleanWeb Ad Blocking Get NordVPN Threat Protection

Customizable Coverage That is Simple to Use
4.6
Editorial Rating
Learn More
On NordVPN's website
VPN
NordVPN
Get NordVPN for up to 74% off + 3 extra months
  • Ultra-secure, high-speed VPN complete with malware protection and automatic blocking of intrusive ads and third-party trackers
  • Other benefits include a premium password manager, dark web monitoring, and access to IP-restricted content
  • 3 plans to choose from for custom protection on up to 10 devices