Know about browser cookies, how they work and what they do?

There is a chance that when you are browsing a site, a small pop up appears on your screen and says this website uses cookies, and you have to accept it before browsing the site.  Once you accept the notification, your computer information is stored in cookie and send back to the web server.


Lead Contributor:

Rashi Gupta 8A DAV Public School Jasola Vihar, New Delhi


Contributed By:

  • Satvik Gupta Class 6thThe Sanskaar Valley School, Bhopal
  • Ishita Aggarwal Class 7th Vishwa Bharati Public School
  • Aayush Saxena Class 10th St Xavier's Sr Sec Co-Ed School
  • Amaan Nizam, 11th, New Horizon School, Nizamuddin New Delhi


What Are Cookies?

Cookies are messages that web servers pass to your web browser when you visit web sites. These messages stored in a small text file. The information like website's name, unique ID, user’s shopping carts, session ID and some other information stored in these text files to identify your computer which you use while browsing a site.


Some websites also include other information in their cookie and it store on your computer. For instance, a cookie might contain any of the following:


  • The amount of time you spend on a website
  • The links you click while using the website
  • The options, preferences or settings you choose
  • Accounts you log into
  • Recording which pages you've visited in the past
  • Login session information
  • Cookies are also used for authentication and tracking


How do they work?

When you visit a site, cookies are downloaded onto your PC and store information in a text file. The next time you visit that site, your PC checks to see if it has a cookie that is relevant (that is, one containing the site name) and sends the information contained in that cookie back to the site. The site then ’knows’ that you have been there before.

For example, you have visited, this site will place cookie on your machine. The cookie file for will contain following information:

UserID    C9A3CFRDE0563983D / has stored on your machine a single name-value pair. The name of the pair is UserID, and the value is C9A3CFRDE0563983D. The first time you visited, the site assigned you a unique ID value and stored it on your machine. When you visit to the same site next time the web site will know that you have visited earlier and you will be presented with site content.

Let say if you log on to, it will store your login information in cookie, when you browse next time you don’t need to put your user ID and password until you clear your cookies from your computer.

 Why cookies can be harmful?

Usually cookies do not have any property to harm your computer, it does not harm your computer like virus and worms but it can reveal your personal information to someone who are not authorized to see. Cyber criminals can hijack your session (man-in-middle attack) and access your browsing session. It can track your browsing history as well. If a site stores personal information, browsing behaviour of user and tracking information then it is an invasion of privacy of individual’s life, this concern has been raised by many whistle blowers.


 Why do you see more cookies pop-ups on sites?

Due to various law and regulation, companies need to inform customers that they are collecting some information and need customers consent before collecting the data. If Companies don’t have users consent, then they can’t collect user information in cookies.

This is the reason you are seeing a pop up to accept the agreement and allow sites to collect your information, if you don’t agree some companies simply won't let you use their website.


Protection Mantra

You follow some basic steps to protect yourself from the misuses of cookies:

  • Before accepting the cookie agreement must know what information it will from you
  • Don’t allow cookies on site which are harmful
  • Only visit sites which you use frequently and trust
  • Keep cleaning your cookies and %temp% file on regular basis