Beranda > Web Development > What Happens from Server to Web Browser

What Happens from Server to Web Browser

Each time you click on a link in a web page or type an address into your web browser you are making a ‘request’ for a certain document. That request is handled with the Hyper Text Transfer Protocol (HTTP) and sent over the Internet to the server which holds the document in question. If all goes well the server responds by sending the document — usually a web page of text and graphics.

HTTP is part of the Internet Protocol (IP) suite. It is used by a ‘client’ such as a web browser to establish a connection with the server which hosts a particular website. The server waits for incoming requests by monitoring TCP port 80.

Transmission Control Protocol (TCP) is used to create connections between two computers on the Internet so they can exchange data. TCP has provisions for identifying the requesting computer and for transmitting data with time stamps so that it can be reassembled in the correct order once it arrives at its destination.

There are several TCP ports which have standardized uses. TCP port 21, for example, is usually reserved for FTP (File Transfer Protocol) for uploading and downloading files. Port 80 is usually used for HTTP.

If the server receives a request string on TCP port 80 in the form of GET / HTTP/1.1 it will send a response code depending on whether the requested web page is available or not. A typical request goes like this:

GET /faq.html HTTP/1.1

This is a request for The ‘Host’ needs to be specified to distinguish websites which are hosted on shared servers. If faq.html is available the server will respond

HTTP/1.1 200 OK

Date: Mon, 12 October 2005 22:38:34 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT

…followed by the actual web page.

HTTP/1.1 200 OK means that the requested web page is available. Other codes can also be returned. The code 404, for example, means that the server cannot find the requested page. The web page is sent via TCP as a series of data packets each with a header that specifies its destination and order in the data stream. The various packets can all take different paths to reach their destination. Each is sent through a router which polls other routers which are close by. If a connection with the first router is unavailable the data will be sent through another one.

As the data is received the client (the web browser) sends back an acknowledgement. This ensures that all the packets are received within a certain time. If not, they will be re-transmitted by the server. TCP also checks that the data is undamaged. The data is reassembled in the correct order thanks to the sequence number of each data packet. Voila! The web page appears on your computer screen.

The TCP connection can be kept alive for additional requests from the client. This allows several pages to be requested within a short time period without causing the overhead of opening and closing TCP ports. Either client or server can close the connection at any time.

Kategori:Web Development
  1. Maret 27, 2013 pukul 5:38 pm

    Hey very nice site!! Man .. Beautiful .. Superb .. I’ll bookmark your site and take the feeds also? I am happy to find so many useful information here in the post, we need work out extra techniques on this regard, thank you for sharing. . . . . .

  2. April 2, 2013 pukul 11:43 pm

    For hottest news you have to pay a quick visit web and on internet I found this
    web page as a best web page for latest updates.

  3. April 17, 2013 pukul 7:29 pm

    Hurrah! In the end I got a webpage from where I be capable of
    truly take valuable facts concerning my study and knowledge.

  4. April 23, 2013 pukul 6:44 pm

    Having read this I thought it was really enlightening. I appreciate you taking
    the time and effort to put this information together.
    I once again find myself personally spending way too much time both reading and posting comments.
    But so what, it was still worthwhile!

  5. Agustus 12, 2013 pukul 2:47 pm

    Hello! Would you mind if I share your blog with my myspace group?

    There’s a lot of people that I think would really appreciate your content. Please let me know. Cheers

  6. September 18, 2013 pukul 4:14 pm

    First off I would like to say superb blog!
    I had a quick question in which I’d like to ask if you don’t mind.
    I was interested to know how you center yourself and clear your
    head before writing. I’ve had a tough time clearing my mind in
    getting my ideas out there. I truly do enjoy writing but
    it just seems like the first 10 to 15 minutes are
    generally lost just trying to figure out how to begin.
    Any recommendations or tips? Appreciate it!

  7. September 24, 2013 pukul 4:46 pm

    We’re a gaggle of volunteers and starting a new scheme in our community.

    Your web site provided us with helpful info to work on.
    You have done a formidable activity and our whole community might be thankful
    to you.

  8. Oktober 3, 2014 pukul 4:21 am

    Wonderful beat ! I would like to apprentice while you amend your website, how could i subscribe
    for a blog site? The account helped me a acceptable deal.
    I had been a little bit acquainted of this your broadcast offered bright clear

  9. Oktober 5, 2014 pukul 7:15 am

    Excellent post. Keep writing such kind of
    info on your page. Im really impressed by your blog.

    Hello there, You’ve performed a fantastic job. I will definitely digg it and for my part recommend to my friends.
    I am confident they’ll be benefited from this website.

  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

%d blogger menyukai ini: