A cookie is a small piece of data stored in the web browser of the user’s computer the  while browsing a website. Cookies remember stateful information, such as connection ID, items added in the shopping cart in an online store. It can also be used track and record the user’s browsing activity.