The World Wide Web HTTP
The Hyper text Transfer Protocols( HTTP) is a protocols used mainly to access data on the world wide web. HTTP functions as a carbonation of FTP( File Transfer Protocols) and SMTP ( Simple Mail Transfer Protocols). HTTP is implemented in two programs a client program and a server program. The client program and server program executing on different end systems talk to each other by exchanging. HTTP message HTTP defines the structure of these message and how the client and server exchange the messages.
HTTP defines how web clients (f or example browser ) request web page from web servers and how servers transfer web page to client. In figure 3.3 when a user requests a web page (f or e, g, clicks on a hyperlink) the browse sends HTTP request messages for the objects ( an objects is simply a file such as an HTML file a JPEG image are GIF image java applet an audio clip and so on in the page to the server.
HTTP uses TCP (Transmission control protocols) is its underlying transport protocol. Because TCP provides a reliable data transfer services to HTTP. HTTP consists of two types of massage format request and response.
figure HTTP request response behavior
The HTTP client first initiates a TCP connection with the server. Once the connection is established the browser and the server process access TCP through their socket interface. On the client side the socket interface is the door between the client process and the TCP connection on the server side it is the door between into its socket interface and receives HTTP response message from its socket interface. Similarly the HTTP server receives request message from its socket interface and sends response message into its socket interface. Once the client sends a message into its socket interface the message is out of the clients hands and is in the bands of TCP.
HTTP need not worry about lost data or the details of how TCP recovers from loss or reordering of data within the network. That is the job of TCP and the protocols in the lower layers of the protocols stack. It is important to note that the server sends requested files to client without storing any state information about the client. If a particular client asks for the same object twice in a period of a few seconds the server does not respond by saying that it just served the object t the client instead the server resends the objects as it has completely forgotten what the server has sent earlier because on HTTP server mantas no information about clients HTTP is said to be as tasteless protocols.