Life Cycle of a Web Request

Life Cycle of a Web RequestViewing a web page is a simple process for a visitor. Just type the URL in a web browser like Internet Explorer or click on a hyper link in any existing web page. The web browser will display the page instantly to you.But do you know that there are several computers involved in this process? Even though it is a very complex process, we can summarize the process as shown below:1. You type the web page address (URL) in a browser. For example, consider the current page http://www.aspspider.com/tutorials.aspx.

This URL has 3 parts:

The protocol - http:
The server name - www.aspspider.com
The file name - tutorials.aspx2.

Browser communicates with a computer in internet called 'Domain Name Server' to find out the IP Address of the server (Eg: www.aspspider.com). Browser establishes a connection to the web server at that IP Address. Server composes a 'Request' for the specified URL and sends the request to the web server to which it has established a connection. The web server identifies the type of the page requested. If it is an asp.net web page, then browser knows that needs some processing by the asp.net service running as part of the web server. The request is handed over to the asp.net service. The asp.net service processes the asp.net page and generates the html output. Web server sends the requested page to the browser.7. When a response is received by the browser, it displays the web page to the user who typed the URL.After you typed the URL in the browser, the request sent by the browser may go through several computers in the internet before it reaches the actual web server. You must be surprised to know that so many things happen and several computers are involved before a simple web page is displayed to you. Most of the steps in the above process happens behind the screen. A visitor need not worry about how a web page is processed and served to the browser.So, by now you must have got a better picture about how a windows application is different from a web application. When you run a windows application (desktop application), only one computer is involved in the whole process. You start an application in your computer and it runs in your computer. But when you request a web page from your home computer, the request goes through several servers in the internet and finally it reaches a computer called 'Web Server'. The actual web page is processed in the web server.