In: Computer Science
Consider a scenario where a web portal uses cookies to track the
users and provides a customized view to the individual user based
on the previously visited sites. The web portal sends a cookie to
the browser, which is stored in the browser at the client’s side
along with the visited sites. This helps to keep track the
previously visited pages of a client from different sites. Prepare
a diagram illustrating how the cookie is used between a browser and
the web portal when a user revisits the web portal and how the
pages are retrieved from different web servers to provide a
customized view to the user. Consider two different web servers for
two visited sites, a web portal and a client in your diagram.
Explain the steps of your diagram. How would I draw the following
scenarios?
SCENARIO 1: How the cookie is used between a browser and the web
portal
SCENARIO 2: the web portal when a user revisits the web
portal
SCENARIO 3: How the pages are retrieved from different
webservers
PLEASE READ THE SCENARIOS I AM LOOKING FOR
Internet will keep data to track our interests.
they do this to target the right ads to us based on our previous search history without our permission. First of all, we will look at some history of cookies and then we look about its working. the cookies are created on1994 by an employee of Netscape communications, the company that made the web browser. the employee try to create an online shop and he didn't want to store the contents of the shopping cart on the server since it is wastage of memory and thus decrease its performance, thus instead he wants to store the same data on user's systems. In 1994 they implemented this in the Netscape browser later internet explorer also followed.
Now, let's look at how cookies work:-
lets consider we have a website that user need to log in to see the contents when user send the correct username and password to the server will send back the required data to them once if verified. However, there is a small limitation. The HTTP protocol - which is what we use to browse the internet - is stateless. That means that when you make another request to that same server, it has forgotten who you are and will ask you to log in again.
Can you imagine how time-consuming it would be to browse around
a site like Facebook and
having to log in again every time you click on something?
Thus we use cookies !!
you now log into the website, the server will verify your credentials. If everything checks out, however, the server not only returns with the content but also sends a cookie to your browser. The cookie is then saved on your computer and submitted to the server with every request
you make to that website. the cookie will contain a unique identifier that lets the server to “remember” who you are and keep you always logged in. Besides keeping you logged in, cookies can also be used to store your settings and web pages consider you browse a site and sort the data to be viewed in alphabetical order since the sort is just temporary settings the chances for saving this in cookies are very much high and efficient too.\
next scenario is: how can companies use cookies to track us around the internet?
although the cookie on a website cannot be read by others. we wonder how facebook contains the ad of the same product that we read about in a blog recently.the the whole tracking starts when we log in to our Facebook account we can look through it step by step:-
1.you log in to Facebook.
2. Facebook stores a cookie on your computer, nothing unusual about that, many other sites do the same thing.
3.facebook.com can read what’s in the cookie.
4.you browse away and you land on someone’s blog.
The blog cannot read your Facebook cookie, and the scope prevents that. Facebook also can’t see that you’re on this blog.
5.let’s now assume that the owner of the blog places a Facebook like button(or google ads) on his website.
6. To show this like button, your browser has to download some code from the Facebook servers, and when it’s talking to facebook.com, it sends along with the cookie that Facebook set earlier.
7. Facebook now knows who you are and that you visited this blog.
this is how entire cookie flow works
this is a simple diagram that explains all the explanations