1.

What is a cookie and what does it do?

Answer»

A cookie is a small text file, which is stored in the client browser. When a client visits any website, through their browser and logs in to the site or FILLS some kind of a form, this data will be passed BACK to the client from the server, with some unique id which identifies the user computer. 

Now, whenever the user visits this website the saved data like username and password will be auto filled. And the user can also be given a unique experience like adding their name in login. 

The modern-day cookies are also known as HTTP cookies as they are used for internet browsing. It GOT its name from the Magic Cookies, which were before the internet era and used to store login information to a database system. 

There are mainly two types of cookies - 

  • SESSION cookies - This is a temporary cookie, which gets deleted once we close our browser. This type of cookie doesn’t store the user information and generally is used to store some form data, filled by the user. 
  • Persistent cookies - They are permanent forms of cookies and stored in the user hard-disk. They are used to TRACK the user's behaviour and other things. By user behavior we mean the Web-surfing behaviour of the user. 


Discussion

No Comment Found