Thursday, February 16, 2012

How Web server works?

This post describes "how web server works".

1. Introduction:
All of you may have question that how and what mechanisms are involved in the Internet. Finally we are receiving our interested information as web-pages with ease of simple efforts (typing context in the search engine). We used to sit in front of computer, right now, viewing this page in a browser. So, when you clicked on the link or typed in its URL for this page, what happened behind the scenes to bring this page onto your screen?
If you've ever been curious about the process, or have ever wanted to know some of the specific mechanisms that allow you to surf the Internet, then read on. In this article, you will learn how Web servers bring pages into your computer-screen-browser (home, school or office). Let's get started!

2.  Process while typing URL in browser:
The steps involved with browser while typing URL in address bar of browser. For example let us take an illustrative url link, as, www.en.wikipedia.org/wiki/Stephen_Hawking. (I considered this URL since, I am curious about his ideology).

The browser decouple the URL into three parts are,
  1. The protocol ("http")
  2. The server name ("www.en.wikipedia.org")
  3. The file name ("wiki/Stephen_Hawking")
Using this information, the browser should get the exact location of the server name( point #2). There fore, the browser communicated with a name server using "http" protocol for obtaining the location of the server name  "www.en.wikipedia.org". Typically, in Internet domain the location will be described with IP Address. There for finally the browser gets the ip address of the server machine. The browser then form a connection to the server located at the IP address on port 80.
 Now, the browser sent a GET request to the server via the HTTP protocol, asking for the file "www.en.wikipedia.org/wiki/Stephen_Hawking" (Note that cookies may be sent from browser to server with the GET request).
The server then sent the HTML file to the browser, namely web-page. (Cookies may also be sent from server to browser at the header for the page.) The browser translates the HTML tags and display on the screen.
Note:
If you find all computer jargons included in this process are new, start to learn web and its associated technologies. The best place to get to know about web-technologies is here. And to understand this whole process in comprehensive details, you need to learn and start with IP addresses, ports, protocols and keep go on.


The next process will be updated soon.

No comments:

Post a Comment