
HTTP is one of the most successful and widely used protocols on the Internet today. It is application-layer protocol used to transmit and receive hypertext pages. HTTP allows a client usually a web browser to send a simple request and receive response back from the server. Whenever you write a URL in address bar of you browser, your browser firstly contacts the web server, web server locates the requested page and sends the appropriate response. These requests and responses are issued in HTTP.
Each HTTP cycle has following steps:
Connection
The connection is established between a web browser and a web server. The connection is established via TCP/IP protocols over particular port generally port 80 is used. However, HTTP is not used to establish connection, it only defines the rules that specify how they communicate.
Request
The web browser sends a request to server, specifying the resource to retrieve. HTTP defines the set of rules for sending the request. Every HTTP request consists of Request-Line, Request-Headers and Message-Body. Sample HTTP request is shown below.
GET /index.htm HTTP/1.1
HOST: www.google.com
Accept: text/html, text/plain
User-Agent: Mozilla/4.0
Each HTTP request has request line and consists of request methods, URI, and HTTP version. After Request-Line, Request-Header starts and providing the characteristics associated with data returned.
Response
It is the response send by the web server to client. The server firstly locates the requested document and sends the appropriate response. However there is a format specified by HTTP to send the response from server. Every HTTP response consists of Status-Line, Response-Headers and Message-Body. Sample HTTP response is shown below.
HTTP/1.1 200 OK
Server: Apache/1.3.3.7
Date: Mon, 23 May 2005 22:38:34 GMT
Accept-Ranges: bytes
Content-Type: text/html
Content-Length: 512
Last-Modified: Tue, 18 Jan 2007 10:12:30 GMT
Connection: close
The first line of the every HTTP response is called the Status-Line and consists of numeric status code returned along with reason phrase. It is the response returned associated with the HTTP request. After Status-Line, Response-Header starts and providing the characteristics associated with data returned.
Close
Finally connection is closed. After each request and response cycle the connection is closed. Each time the web browser makes request, new connection is established. There is no account for the previous requested resource on web server or I can say that there is no session maintained. This makes HTTP a stateless protocol.
References:
Watch the video related to Web Browsers Introduction
Opera Turbo lets you browse the Web more than 2x faster than any other browser when connected at speeds of 100Kbps. Learn more and download the Opera Web browser at www.opera.com … opera web browser compressing technology compression turbo speed fast wireless connection
January 6th, 2010 on 8:24 am
Firefox 3.5 ftw
Safari is sux.
January 6th, 2010 on 8:37 am
WebKit FTW!
January 6th, 2010 on 4:43 pm
I used to say that but it’s seriously ticking me off this version. I had to start using Firefox (which I hate). My Safari keeps crashing!
January 6th, 2010 on 9:33 pm
This is what Apple fanboys really believe.
January 7th, 2010 on 1:14 am
F YEAH!!!!! SAFARI ROX!
January 7th, 2010 on 5:24 am
It wasn’t popular until a few years ago. Before then it was just a website that existed, but no one knew about them. Much like FaceBook which hid under the radar for a while until it finally made it big.
January 7th, 2010 on 8:10 am
WHy?????/ It is a well known fact that Safari is the fastest and most standard complient web browser in the history of history!
January 8th, 2010 on 10:51 am
No it’s not! Safari is the best! Every other browser is shit!
January 9th, 2010 on 12:01 pm
Then test it yourself!