Identify the correct order in which the following actions take place in an…

2014

Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.

1. The web browser requests a webpage using HTTP.

2. The web browser establishes a TCP connection with the web server.

3. The web server sends the requested webpage using HTTP.

4. The web browser resolves the domain name using DNS.

  1. A.

    4,2,1,3

  2. B.

    1,2,3,4

  3. C.

    4,1,2,3

  4. D.

    2,4,1,3

Attempted by 622 students.

Show answer & explanation

Correct answer: A

Key idea: the browser must know the server IP and have a transport connection before sending an HTTP request.

Correct order: 4 → 2 → 1 → 3

  • Resolve the domain name using DNS (4): the browser finds the server's IP address for the requested domain.

  • Establish a TCP connection with the web server (2): the client and server perform the TCP three-way handshake so data can be exchanged reliably.

  • The web browser requests a webpage using HTTP (1): the HTTP request is sent over the established TCP connection.

  • The web server sends the requested webpage using HTTP (3): the server responds with the requested resource over the same connection.

Notes: DNS lookups are often cached so a lookup may be skipped in practice. For HTTPS, a TLS handshake occurs after TCP is established and before the HTTP request is sent.

Explore the full course: Gate Guidance By Sanchit Sir