Nowadays, A lot of websites display a message saying, "By browsing our website you agree to our cookie policy.” Many of my friends are baffled by this sentence. They often ask what are cookies and what do they do?
First it is important to note that a cookie, contrary to what the name suggests is just a text message that a Web server sends to a Web Browser. To understand why we need a cookie, I think we need an example.
The Example
Keeping cookie in mind let us have an example of an ice-cream vendor (mmm.. desert). The vendor has a shop where every day scores of people visit and buy ice-cream from him. His store has just about every flavor under the sun.
Little Sam and Susie have been coming to the store for the last 2 weeks. Their mother had once handed out a list to the vendor about the things Sam has allergies to. Sam can eat only chocolate with sprinkles and Susie likes plain strawberry. Whenever they approach the store, without asking, the vendor begins to prepare the ice-cream cone beforehand.
Why? After seeing them at the store for so many days, he knows their likes and dislikes. He knows that Susie will not eat anything other than strawberries and Sam will not have anything without sprinkles. So he modifies any order given to him likewise. This way Sam and Susie always get what they like.
The Relation
In our story, the recipe given by their mother is a cookie (Not an actual cookie but the internet one). The cookie does the important job of giving information of the preference of a particular browser, thereby helping it display content that is relevant to the visitors. The vendor would never give Sam anything listed on the paper that his mother gave. Hence Sam and Susie will always be happy and revisit him every day.
Why do Websites use cookies?
The Design of a website is important in terms of visitor experience. Your blog is adorned with awesome layouts and dynamic and slider templates with exquisite patterns (Chosen in consultation with a design professional). But in the end, what matters is "Does the User likes it?". Similarly, in the internet world, preferences and personalization often matters. When a mail that you receive has your name on it, you are bound by curiosity. When a commerce website offers you range on cheap shoes you are delighted because that was what you were searching few hours ago.
In short, cookies help you get a really personalized experience from a generic website and that is what gives you an edge over your competitors. It might even reduce your bounce rate (though bounce rate are not that important)or keep visitors longer at your website leading to higher revenue.
Know the cookies in your computer
Even you can check about the cookies stored in your computer with some simple steps.
Types of Cookies
Now that the concept is clear to you, we shall go forward and understand what the differenct types of cookies are. Essentially there are just two types of cookies,Session Cookie (Temporary one)
This one gets deleted once the browser is closed. They cannot collect information from your computer and is stored in temporary memory.The persistent cookie (The permanent one)
It is stored on your hard drive and stays there until you delete them manually. (We shall discuss how to delete cookies manually)Hope you've understood the concept of Cookies.
If you have any more questions, Drop it in as comments, we'll update.
Related Memes
This answered