• retagged by
29,503 views
38 38 votes
Assume that you have made a request for a web page through your web browser to a web server. Initially the browser cache is empty. Further, the browser is configured to send $\textsf{HTTP}$ requests in non-persistent mode. The web page contains text and five very small images.The minimum number of $\textsf{TCP}$ connections required to display the web page completely in your browser is__________.

8 Answers

Best answer
70 70 votes

In $\textsf{HTTP}$ non-persistent connection, each time a request is served by the server, the connection is automatically closed by the server.

So we need $1$ connection for web page and $5$ for images. Thus, in total we need $6$ $\textsf{TCP}$ connections to fetch web page completely.

Answer: 6

• selected by
29 29 votes
Since, Browser cache is empty, first of all DNS will complete its DNS translation, but that would be a UDP connection, so you don't need to worry about it!

After that, first TCP connection will be established which will be used to request the BASE HTML FILE. After the client extracts the base html file, it will Request for the five referenced objects of the pagr using five different TCP connections.

Hence, total 6 TCP connections would be required.
8 8 votes
6

In non-persistent HTTP for every object there is a TCP connection required. Hence 1 TCP connection for text and 5 TCP connections for images required. So, total of 6 TCP connections are required.
7 7 votes

🌐 Non-Persistent HTTP

  • Behavior: Each HTTP request uses a separate TCP connection. Once the server sends the response, the connection is closed.

  • Scenario:

    • 1 TCP connection for the base HTML (text).

    • 5 TCP connections for the 5 images.

  • Total TCP Connections: 6

✅ Each object (HTML + 5 images) needs its own TCP connection.

🔗 Persistent HTTP

  • Behavior: A single TCP connection is reused for multiple HTTP requests/responses.

  • Scenario:

    • 1 TCP connection is established.

    • All 6 HTTP requests (1 for HTML + 5 for images) are sent over this single connection.

  • Total TCP Connections: 1

✅ One connection handles all requests efficiently.

6 6 votes

like this we have to establish the connection in non persistent connection so 1 connection for web browser and 5 connections for 5 images so total 6 s

for persistent we need to establish one time only

 

0 0 votes

Non-Persistant : The web page has Text + 5 images so we need to make 6 HTTP requests (1 for page itself++ 5 for images) over separate TCP connection.

Persistant : Here also we need 7 HTTP requests but over single TCP connection.

 

• edited by
Answer:
Position:
Show:

Related questions

60 60 votes
4 answers 4 answers
25.1k
25.1k views
Arjun asked Feb 12, 2020
25,075 views
Consider a double hashing scheme in which the primary hash function is $h_1(k)= k \text{ mod } 23$, and the secondary hash function is $h_2(k)=1+(k \text{ mod } 19)$. Ass...
49 49 votes
7 answers 7 answers
28.0k
28.0k views
Arjun asked Feb 12, 2020
28,015 views
Consider a $\textsf{TCP}$ connection between a client and a server with the following specifications; the round trip time is $6$ ms, the size of the receiver advertised w...
47 47 votes
7 answers 7 answers
30.4k
30.4k views
Arjun asked Feb 15, 2022
30,389 views
Consider the resolution of the domain name $\textsf{www.gate.org.in}$ by a $\text{DNS}$ resolver. Assume that no resource records are cached anywhere across the $\text{DN...
31 31 votes
7 answers 7 answers
18.9k
18.9k views
Arjun asked Feb 12, 2020
18,896 views
Consider the following statements about the functionality of an $\textsf{IP}$ based router.A router does not modify the $\textsf{IP}$ packets during forwarding.It is not ...