Cookies: Are all of them "digestible"?

Cookies: Are all of them "digestible"?

We have often seen a pop-up message in many websites, "We use cookies to make your experience of our websites better". But what are cookies?

ยท

2 min read

There are several types of cookies like Chocolate chip cookies, Peanut butter cookies, Oatmeal raisin cookies, etc. But sorry, we aren't going to talk about them. Today we'll know about Website-cookies (HTTP Cookies), what they are, are they safe or dangerous to "eat".

What are cookies?

Let's say we visit any website; say online shopping website and we select some items, keep it in the cart, and close the website. Now even after few days or months when we open the website again, we could see that the items we kept in the cart are still there. Have you ever wondered how the website knew that it was you and the cart was yours?

It's all because of cookies.

Cookies are some text files with small pieces of data, like unique ID that get stored in the cache memory of our internet browser.

How do the cookies work?

When you visit a website for the first time, it will set a cookie. Whenever you'll make another request, the cookie will be sent to the server. Then the server will know the client, check its database, and respond according to that.

cookies workflow (1).png

Are cookies safe?

Let's first know what the functions of cookies are before drawing to any conclusion.

Functions of cookies

  • Track user's browsing activity to serve targeted information like ads.
  • Remembering login details so we don't have to login again and again.
  • Track visitor's count.

So, we can see from the functions that they are quite helpful. Without cookies, we might have to login every time we open the same website, we might have to store the same items in the cart repeatedly as the website won't remember our details.

BUT are they always safe?

Everything is safe as long as we are browsing reputable websites and the cookies aren't Third-party cookies.

Third-party cookies

Third-party cookies are set for the URLs that you do not visit.

Generally, they are linked with the ads on any website you visit. They plant cookies on your browser and then these cookies can extract details of any website you visit and steal your files and hamper your privacy and sensitive details.

How to avoid third-party cookies?

Every browser has an option to block all third-party cookies. If you enable the option, you can be safe from third-party cookies.

Conclusion

I tried my best to explain what cookies are, how to they work, what their functions are and are they safe or not.

I hope you found it useful and easy to understand. Do share your ideas and let me know your views.

Happy learning! ๐Ÿš€

ย