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 HTTP requests in non-persistent mode. The web page contains text and five very small images. The minimum number of TCP connections required to display the web page completely in your browser is__________.
Correct Answer:
6
Solution:
Non-Persistent Connections:
- One TCP connection is established for each request/response in non-persistent mode.
- The client opens a TCP connection and sends a request, the server sends the response and closes the connection.
- The client closes the connection when it reaches an end-of-life marker in the data being transmitted/received.
∴ In the non-persistent mode for n-different files, the connection needs to be opened and closed n times, (irrespective of the size of file).
Given:
One web page with text = 1 connection
Five small images = 5 connections
Total TCP connection = 5 + 1 = 6