What is a cookie?

A cookie is a data packet that allows the browser to remember information about you. Learn more about what cookies do, common varieties, and privacy concerns.

Illustration of Cookie
Illustration of Cookie

A cookie is a data packet that stores information on a website user’s history. Most websites use cookies to some extent, sending them from the web server to your browser. From there, the cookie is either stored on your device or automatically deleted at the end of your session. 

As users, many of us either flatly accept all cookies out of convenience or reject them due to privacy concerns. But internet cookies have both benefits and drawbacks, and understanding them can help you make better choices. We’ll teach you about cookie usage, varieties, and ways to enhance your privacy. 

A cookie may also be referred to as an HTTP cookie, a website cookie, a web cookie, an internet cookie, or a browser cookie. 

Cookie policy

What are cookies used for? 

On the broadest level, cookies record personal data on a user. Once you’re “cookied” into a web page, it remembers key details for a set period of time. That information can be used for several purposes: 

  • Personalizing the experience: By recording previous actions, preferences, and settings, websites can adjust to the user for a better browsing experience.

  • Authenticating users: Some cookies authenticate users, verifying that the actual account owner is making the request. This is valuable for fraud prevention.

  • Maintaining user sessions: A cookie may collect session data, saving you the trouble of logging back in or reentering information as you navigate between site pages. 

  • Analyzing user behavior: Companies may use cookies to gather analytics on how users interact with the website. They can then use the insights to improve the user experience.

  • Targeted advertising: By tracking your behavior, advertisers can deliver ads that are relevant to your interests. Google Ads also uses cookies to allow you to mute ads you don’t want to see again. 

Are cookies bad? 

Like their sugary baked cousins, web cookies get a bad rap in some circles. However, whether a cookie is good or bad depends on the purpose and context. 


  • Personalization

  • Easy logins

  • Enhanced user experience


  • Privacy concerns

  • Slower browsing speeds

  • Websites won’t recognize you if you delete cookies or switch devices

What are the most common types of cookies?

There are several common types of cookies. In fact, just one domain can generate multiple varieties. Here are some you’ve probably already encountered: 

  • First-party cookie: Every cookie is either a first-party or a third-party cookie. First-party cookies come directly from the domain you visit

  • Third-party cookie: Third-party cookies belong to another domain, such as an advertiser.

  • Session cookie: A session cookie may also be called a transient cookie, an in-memory cookie, or a non-persistent cookie. It temporarily records information as you navigate through the website and deletes the data when you leave. 

  • Persistent cookie: Persistent cookies are tracking cookies that record how you use a specific website over a more extended period of time. 

  • HttpOnly cookie: HttpOnly cookies are designed to reduce the risk of cookie theft and cross-site scripting (XSS) attacks by blocking access from client-side APIs, including JavaScript.

  • Secure cookie: A secure cookie requires an encrypted connection (HTTPS) and expires when the session is complete. 

  • Zombie cookie: Also known as a supercookie, a zombie cookie collects information on a user’s browsing habits and stores it outside of the web browser’s normal cookie storage. If the original HTTP cookie is deleted, it automatically generates another. Flash cookies are one of the most common varieties. In 2010, many big-name companies faced a class action lawsuit for their use of zombie cookies. 

Keyboard google

How do cookies impact user privacy?

Since website cookies record user information, there are inherent privacy concerns. Most cookies enhance the user experience without any major drawbacks. However, there are some exceptions.

Third-party cookies generally aim to track activity to present targeted ads rather than improving your browsing experience. That means someone is collecting information on your activity for their personal gain. Adversaries could also theoretically use third-party cookies to effectively stalk a user, and threat actors may disguise malware or viruses as cookies. 

Because of the privacy concerns associated with cookies, the European Union adopted the ePrivacy Directive, also known as the Cookie Law. This legislation requires that any website owned in the EU or directed at its citizens must perform a cookie audit, disclose how cookies are used, and obtain user consent. 

While the federal government of the United States does not have equivalent laws, the California Consumer Privacy Act (CCPA) places some restrictions, such as requiring that websites inform users of cookies and allow users to opt out of the sale of their personal information.

How do you clear cookies?

The process for clearing cookies depends on which browser you use. 

How to clear cookies on Google Chrome

1. Open Chrome. 

2. Click the drop-down menu with three vertical dots in the upper-right corner.

3. Click More tools > Clear browsing data…

4. Select the time range.

5. Ensure there’s a check next to Cookies and other site data.

6. Click Clear data

How to clear cookies on Safari

iPhone, iPad, or iPod touch

1. Go to Settings > Safari.

2. Tap Clear History and Website Data.

3. Tap Clear History and Data

Mac (macOS Monterey 12)

1. Open Safari.

2. Select Preferences > Privacy.

3. Click Manage Website Data.

4. Select the websites from which you want to remove cookies.

5. Click Remove or Remove All.

How to clear cookies on Microsoft Edge

1. Open Edge.

2. Click the drop-down menu with three horizontal dots in the upper-right corner.

3. Click Settings > Privacy, search, and services.

4. Scroll to Clear browsing data and click Choose what to clear.

5. Select the time range.

6. Ensure there’s a check next to Cookies and other site data, and then select Clear now.

How to clear cookies on Firefox 

1. Open Firefox.

2. Click the drop-down menu with three horizontal lines in the upper-right corner.

3. Click Settings

4. Click Privacy & Security.

5. Scroll to Cookies and Site Data, and click Clear Data…

6. Ensure there’s a check next to Cookies and Site Data, and then click Clear.

How else can you increase your privacy?

Blocking or deleting unnecessary cookies is a good start, but it won’t fully protect your privacy. Here are some other steps privacy-minded businesses might take. 

Use a VPN

A virtual private network (VPN) encrypts traffic and hides your IP address. That said, cookies can still track you, so privacy-minded businesses should pair a VPN with other methods. 

Use your browser’s privacy mode

If you want to keep your online activities secret or get around metered paywalls, you’re probably already familiar with your browser’s privacy or incognito mode. This option prevents history, cookies, and site data from saving once you close the browser. While some cookies and other data may stick around for the duration of your session, the slate is wiped clean when you’re done. 

Switch to a search engine that doesn’t track you

Most popular search engines remember your history, document the results you click, log your IP address, and much more. Using a search engine that doesn’t use cookies, such as DuckDuckGo, can enhance your privacy. While you can still pick up cookies from whatever results you click, at least there won’t be as much evidence of how often you search for lazy sysadmin tips

Looking to streamline your patch management
and software deployment processes?