Whats a cookie in the web?

841 views

Whats a cookie in the web?

In: Technology

7 Answers

Anonymous 0 Comments

When you visit a web page your browser will send requests to the web server for the different documents needed to display the page. One weakness of this initial system was that there were no way to add persistent features to any web pages. There was no way for the web server to guarantee that the second request came from the same browser as the first one. So if you added things to your shopping cart or even just submitting your login credentials there were no way for the web server to keep that information as you clicked another link. So they came up with the idea that the web server could send a little piece of information to the response and ask your web browser to include that cookie in all subsequent requests. This was a way for the web site to add persistent information to a browser session.

The issues with this is when web sites wants to gather information about what other web sites you visit. The way they do this is to add other web sites to include content from their servers, typically a “like” or “share” button, advertisements or even invisible content. In return they will get better statistics about their users and sometimes monetary compensation. As your browser now sends requests to the servers of the big web site it will include the cookie it received the last time which makes it possible for the web site to see which web sites you are visiting and therefore gather information about almost everything you do online.

You are viewing 1 out of 7 answers, click here to view all answers.