How HTTP connection works ?

When you try to access particular URL in your browser it goes through following steps to get response


  • First browser needs to determine the IP address and port number of the web server from the URL. If the host name in the URI was not recently visited it may take tens of seconds to convert the host name from a URI into an IP address using the DNS resolution infrastructure

  • Next the client sends a TCP connection request to the server and waits for the sever to send back a connection acceptance reply. Connection setup delay occurs for every new TCP connection. This usually takes a second or two but it can add up quickly when hundreds of Http transactions are made.

  • Once the connection is established, the client sends the HTTP request over the newly established TCP pipe. The web server reads the request message from the TCP connection as the data arrives and processes the request. It takes time for request message to travel over the internet and get processed by the server

  • The web server then writes back the Http response, which takes some time



YOu can use Firebug to loot at the time spent by browser in each of these steps, take a look at following screen shot



Firebug will display timeline for each of the resource, different colors in the timeline display time spent in each of the phase of getting response, when you take your mouse over particular resource it will display a popup with details on time spent in each phase


  • DNS Lookup This is amount of time it took for Firefox to figure out IP address and port number from the URL. Please note that Firefox will cache the results of DNS lookups. This time is longer for first request to host name

  • Connecting This is amount of time it took for Firefox to establish Http connection with the server

  • Sending This is amount of time it takes for Firefox to send the request

  • Waiting Time taken for server to read the request process it and start sending message

  • Receiving Time taken for firefox to receive the response sent by server

4 comments:

Anonymous said...

great useful article. thanks!

srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer

EG MEDI said...

Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery


Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store