Sunday, April 17, 2011

HTTP - Getting Started

HTTP - HyperText Transfer Protocol
It is a request response oriented protocol which defines the way how a client and server talk to each other. By protocol we mean some set of rules. The client is typically a web browser.

So how it works?
Well, the client sends a request for some resource to a server and the server sends it back a response corresponding to the resource requested for. This is the basic idea.

 The request is also called as 'query'. The server generally makes use of a database to find the resource that the client has requested for.

Clients and Servers both know HTTP and communicate over it. For this the client (web browser) must know  
html. If the response of a server to client's request is an html document then it needs to send it using HTTP protocol.

Bottom line is: A web server uses HTTP to talk to client.

HTTP runs on top of TCP/IP protocol to ensure that the files that are being sent as a response are received at destination as a complete file although it is broken up into chunks when sent. Anyways thats all going into networking and transport layer protocol so we wont talk more on it. :) Just remember that HTTP is an application layer protocol.

Basic structure of HTTP conversation is an easy guess now !!! - request/response sequence : client requests and server responds...

Coffee Break
HTTP is the protocol clients and servers use on the web to communicate.
The server uses HTTP to send html to client. So html is a part of HTTP response. :)
html tells the client (browser) how to display contents to the user.
HTTP is an application layer protocol.

No comments:

Post a Comment