HTTP and TCP/IP
Each time a HTTP request is sent, a TCP/IP connection is made. When a browser makes a request, the following network activity results:
-
The browser initiates a TCP/IP connection to the web server on the host and port identified in the URL of the request.
-
The host sends back a TCP acknowledgment to indicate a virtual circuit has successfully been established.
-
The browser sends the HTTP request in full to the server using the established connection.
-
The server acknowledges the receipt of the request and starts to generate a response. The browser waits for the response and times out if the response doesn't arrive within a preset time limit.
-
The server sends the HTTP response message to the browser.
-
The browser acknowledges the receipt of the complete HTTP response.
-
The server disconnects the virtual circuit.
Each HTTP request-response sequence is a completely separate network connection: each request message sent by a web browser-or any other HTTP user agent-is totally independent of any other request. Every request message a web server receives has its own separate response. This independence of requests is what makes the HTTP protocol stateless.