What are Cookies? Different Types of Web Cookies

What are Cookies? Different Types of Web Cookies, Explained

'What are Cookies?'- this question has become ubiquitous ever since GDPR came into effect.

Cookies have been of great importance in the tech industry since the advent of the digital world.

Mention “cookies” and most people expect a chocolate chip treat to appear. When talking about computers, however, cookies aren’t on the dropdown menu.

In fact, they’re not even physical objects. Yet they do a great deal of the work that makes it more convenient for you to browse the Internet — and they can be troublesome if you don’t know how to clear or delete cookies.

What are Cookies?

Cookies are small text files sent from the website to the person’s terminal (usually the browser), where they are stored before being transmitted again on the same website visited by the same user. 

A cookie cannot retrieve any other data from the user’s hard drive nor pass on computer viruses or capture email addresses. Each single cookie is unique to the user's web browser. 

Some of the cookies’ functions can be transferred to other technologies. In this document the term 'cookie' refers to both cookies, as such, as well as all similar technologies.

How Cookies Work?

Like if you are using flipkart.com website on your computer, then flipkart.com will create a file related to what you have bought on flipkart.com and what you have seen and you will get it in Internet Browser's Catch Memory. 

Next time you go to flipkart.com, it will show the product related to the same product that you have bought and seen before and will save your User Id as well. The job of cookies is only to bring back the last activity of the website to you.

Types of Cookies

Basically, there are 5 types of Cookies. We'll discuss each of them below.

  1. First-party Cookies
  2. Third-party Cookies
  3. Session Cookies
  4. Persistent Cookies
  5. Secure Cookies

Let's see each of them in detail.

1. First-party Cookies

First-party cookies are set by the website visited by the user. The data collected using first-party cookies is used for purposes like calculating pageviews, sessions, and number of users.

Primarily, publishers have access to data collected using first-party cookies, which can later be shared with advertisers or agencies for ad targeting. Apart from that, analytics tools – like Google Analytics – use first-party cookies to understand user behavior and present it in tabular or graphical form for the publisher’s understanding.

2. Third-party Cookies

Third-party cookies are set by domains that are not directly visited by the user. This happens when publishers add third-party elements (like chatbot, social plugins, or ads) on their website. 

Once installed, third-party cookies also track users and save their information for ad targeting and behavioral advertising. For example: Let’s say that you added a YouTube link to one of your blogs. Whenever this YouTube link gets a click, a YouTube cookie will be added to the user’s browser. This cookie can track him/her until it expires.

3. Session Cookies

A Session Cookies are cookies that are set for the duration of the current browser session. The browser session lasts until the browser is closed by the user. Once the browser is closed, the session ends and cookies are removed. The next time the user wants to log in to the website, they will have to re-enter their information to start a new session.

A common use of a Session Cookies is for a Shopping Cart. As long as the user keeps the browser running, the shopping cart will be saved. User can browse further to that site or even go to other sites and come back and revisit any Shopping Cart Item in Shopping Cart.

4. Persistent Cookies

As the name suggests, persistent cookies stay on the user’s browser for a very long time. Generally, persistent cookies are required to have an expiration date which could be anything between a second to 10 years. The above shared screenshot is an example of persistent cookies with expiration date.

Persistent cookies are used by publishers to track a single user and his/her interaction with their website. To check whether your browser has persistent cookies, try this. If you are logged in to Gmail on the browser, then close the tab(s) and restart your device. 

When your device turns back on, open the same browser and visit the same service or account (Gmail), if you are still logged in, then you have persistent cookies saved on the browser, dropped by Google mail service.

Browsers are making it harder to use cookies. Web browsers like Firefox and Safari are updating their products to kill these cookies as soon as users are done with the websites. And Chrome is soon to join this bandwagon and will start blocking third-party cookies by 2022.

5. Secure Cookies

Only HTTPS websites can set secure cookies, i.e., cookies with encrypted data. Mostly, the checkout or payment pages of e-commerce websites have secure cookies to facilitate safer transactions. Similarly, online banking websites are required to use secure cookies for security reasons.

Conclusion

I sincerely hope that I have given you complete information about the What are Cookies?, and I hope you guys have understood that what are cookies.

It has always been my endeavor that I always help my readers or readers from all sides. If you guys have any doubt of any kind, then you can ask me irresponsibly. I will definitely try to solve those Doubts.

Tell us how you felt about this article for What are Cookies? by writing a comment so that we too have a chance to learn and improve something from your ideas.

Your review of this article?