1. This problem and the next two concern web browsers and HTTP. (a) As described
ID: 3744322 • Letter: 1
Question
1. This problem and the next two concern web browsers and HTTP.
(a) As described on text p. 107, to download the web page located at gaia.cs.umass.edu/kurose ross/interactive/index.php browsers must first open a TCP connection to gaia.cs.umass.edu’s web server and then issue the HTTP commands
GET /kurose_ross/interactive/index.php HTTP/1.1
Host: gaia.cs.umass.edu
Why is the “Host:” command needed? Wouldn’t this web server already know its own name? Explain.
(b) What HTTP service do the client’s HTTP “If Modified Since” header and the server’s HTTP “LastModified” header support? How is it possible for these commands to work even if the two machines have vastly different notions of time (i.e., no clock synchronization)?
(c) Ever notice that after you search for a product on one web site you often start seeing ads for similar products when you visit other web sites? Briefly explain how this happens.
(d) Give two reasons why queries to a web site’s authoritative DNS server would return different IP addresses
Explanation / Answer
1.(a) If you follow the HTTP 1.1 protocols you can see that the host field is mandatory. The host header field in a request contains the host and port information of the target URL. This enables the origin server to distinguish among the resources. It needs to do that because it may service requests for multiple host names for a single IP address. It is a critical information for handling the request. a user agent should generate Host as the first header field following the request-line.
It is used for virtual hosting. And this practice is very common now.
(b) “If Modified Since” and “LastModified” are two conditional headers used in http. Generally it is used to update cache. When a cache becomes stale it generates a conditional request. The value of the validator is used as a parameter of the If-Modified-Since and If-Match headers. The server sends 304 or NOT MODIFIED if the resource is not changed. The server just sends back a 200 OK,and the new version of resource if the resource has changed.
For partial download integrity also this is used. It helps to resume operation by saving bandwidth and time and keeping previously downloaded expression.
The if-modified is used to check : if the downloaded resource has been modified between both downloads. Then the final documents will be corrupted. If it is seen that the resource is modified then the client then restarts the download from the beginning.
(c) This act is called retargeting. For this it takes helps of the cookies. When a web browser visits a site, cookies are exchanged. It is used by maximum websites for various purposes, including advertising, keeping users signed in and customizing content. When a person visits an ecommerce site, a cookie is placed to the persons browser for whatever he has searched on it. When that person using the same computer visits another site it comes as an advertisement.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.