Why Websites Use COOKIES ?

Why Websites Use COOKIES ?

Whenever we visit websites, most of the time we receive pop-ups like "Accept the Cookies !" so what are these cookies and why do websites use this thing? 🍪

Let's understand 🍪 in a very easy way by correlating it with our daily life example

  • Imagine You visit any shopping website, as soon as you reach the main home page of their website, they ask you to login into the website with your credentials


  • Now You enter your credentials and successfully login into the website


  • Now you want to order something and this happens -


  • And Website again asked you to sign in -


This is where the role of COOKIES 🍪 comes in -

" A cookie is a small amount of data stored on your computer, tablet, or phone, created by and read by website servers that help the website to identify you "

A cookie is a small file that is stored on a user's computer. It is designed to hold a modest amount of data specific to a particular visitor and website and can be accessed either by the website's server or the visitor's computer.
When you go back to the website, your computer sends the information back to the site.


  • So, Now you have cookies and from now onwards every time you visit the website -


There are different types of Cookies :

  • First Party Cookies

  • Third-Party Cookies


Conclusion

In theory, cookies are a good thing. The personalization of browsing lends itself to a streamlined user experience. However, hackers can replicate information from a cookie even after it’s been deleted.

I hope you found this useful and learned something new today

Consider following me for more amazing stuff! Let's connect on Twitter !

This blog is written for the “Development” track of CoCode Blogs - Pooja Sanwal