When you browse the Internet, the websites that you visit can provide you with a much better experience if they know whether you’ve been to the website before, if you’ve placed any items in your shopping cart, or if you’ve completed any other actions that the website needs to know to help you have a better experience as you move from page to page.
The most common way for a website to store this information is by creating a cookie. A cookie is a file not on the website, but on your computer. The cookie contains the address of the website and information that allows the website to identify what actions you’ve taken on the site previously. Because cookies are files, your computer can store many different cookies for many different websites. Cookies typically don’t contain any personal information about you. They only contain information about your behaviour on the website. They may contain your login id, but they usually don’t contain your password.
If you shop online, you will be able to do so because of cookies. For example, when you are booking a hotel or reserving a flight on an aggregator website such as www.Expedia.com, it is cookies that separate the hotel rooms that you like from the ones that you are not interested in.