search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
9 votes
3.3k views

A graphical HTML browser resident at a network client machine $Q$ accesses a static HTML webpage from a HTTP server $S$. The static HTML page has exactly one static embedded image which is also at $S$. Assuming no caching, which one of the following is correct about the HTML webpage loading (including the embedded image)? 

  1. $Q$ needs to send at least 2 HTTP requests to $S$, each necessarily in a separate TCP connection to server $S$
  2. $Q$ needs to send at least 2 HTTP requests to $S$, but a single TCP connection to server $S$ is sufficient 
  3. A single HTTP request from $Q$ to $S$ is sufficient, and a single TCP connection between $Q$ and $S$ is necessary for this
  4. A single HTTP request from $Q$ to $S$ is sufficient, and this is possible without any TCP connection between $Q$ and $S$
in Web Technologies 3.3k views
0

i think answer should be A. this is because, it has explicitly been mentioned that no caching is there. this means that as soon as 1st request is processed, the server closes the connection right then. so client has to establish a new TCP connection, and consequently send a new http request. reference for the link is below.

https://nptel.ac.in/courses/106105081/40

3 Answers

14 votes
 
Best answer
A separate HTML request must be send for each image or component in HTML like css file of js. But all can be done in same connection. So, (B) is the answer.

selected by
1
sir by default HTTP is persistent, if it is given non-persistent HTTP then what about TCP
0

It seems to be correct what you have written. BUT

Observe.

In question it is given that HTML page has exactly one image.

So we need exactly one single request.

But It seems that my claim doesn't match with correct answer.

So provide insight where my observation or logic needs more clarity.

Thanks.

0
Do graphical browers use persistent connection ?
1
@Arjun sir,

Why not option c..i.e a single request from q to s is sufficient.
0
why not option c?
0
Why at least 2 http request is required when we have only one static embedded image on server?
3 votes
Whenever a browser opens a webpage, it makes a separate request for each object of page like image, css, javascript, etc. However if multiple resources are served from same server, then one TCP connect is sufficient.
0
Whenever browser open a web page it will require multiple requests for multiple objects and they are served from same server than one tcp connection is enough for that.
0
copied  from GeeksforGeeks
2 votes

The answer is B.

Firstly, Q makes a TCP connection with S. 

After that, it sends the first request for the webpage. When it is received, it sees that there is also an image which needs to be picked up, so it makes another request to S for the image.

Then it may close the TCP connection. 

This is how it is done if we are using HTTP version 1.1( which is always used now). One connection, also called HTTP persistent connection, is enough to make several requests on the same server.

So, the answer is B.

Before 1.1, there used to be non-persistent connections wherein a client had to make and close N connections for N different requests. 

 


edited by
Answer:

Related questions

0 votes
1 answer
1
165 views
Web links are stored within the page itself and when you wish to ‘jump’ to the page that is linked, we select the hotspot or anchor. This technique is called Hypertext Hypermedia Both $(A)$ and $(B)$ Anchoring
asked Apr 1, 2020 in Web Technologies Lakshman Patel RJIT 165 views
0 votes
1 answer
2
164 views
Web links are stored within the page itself and when you wish to ‘jump’ to the page that is linked, we select the hotspot or anchor. This technique is called Hypertext Hypermedia Both $(A)$ and $(B)$ Anchoring
asked Apr 1, 2020 in Web Technologies Lakshman Patel RJIT 164 views
0 votes
2 answers
3
191 views
Which of the following HTML code will affect the vertical alignment of the table content? <td style="vertical-align:middle"> Text Here </td> <td valign="centre"> Text Here </td> <td style="text-align:center"> Text Here </td> <td align="middle"> Text Here </td>
asked Mar 24, 2020 in Web Technologies jothee 191 views
5 votes
3 answers
4
3.2k views
Choose the most appropriate HTML tag in the following to create a numbered list <dl> <list> <ul> <ol>
asked May 7, 2017 in Web Technologies sh!va 3.2k views
...