Introduction of Web Server and Web Browser
Introduction of Web Server and Web Browser
Web Server -
Web Server is a program used for delivering Web Pages to the respective client. The Web Server uses
client server architecture for execution of the web services. HTTP protocol is used for communication
between the server and the client in the system.
Data Server
Web Server
Web Browser
The Request is sent from the client to the Web Server through Request object. The Web Server performs
the processing and send the data to the application server. The data is received by the Database server
for some database operations. The Database Management Structure performs the query operations and
the responds output is send back to the Database Server. The Database Server send the data back to the
client through Response object through Web Server.
Web Browser
Web Browser is an application used to retrieve, present, and transfer information on World Wide Web.
Each Web Browser has a Uniform Resource Identifier (URI). The information regarding a particular
browser can be located through the URL of the respective browser.
Internet Explorer, Google Chrome, Opera, Mozilla Firefox, Safari are different Web Browsers that are
used to access the information.
HTTP Protocol
Hyper Text Transfer Protocol is an application protocol that defines the format of messages and actions
Web Server must perform. HTTP is a stateless protocol. Each command in the HTTP protocol is executed
without depending on the previous commands executed on the Web Server.
The HTTP protocol uses the request response structure in the client server architecture. The protocol is
located in the application layer of the Internet Protocol suite.
The execution of the HTTP protocol in the client server architecture is mentioned below:
The client/user send the request to the server through the request object. Server performs the
necessary operations and responds the result back to the client. HTTP protocol is used as
communication protocol between the client and the server.
URL -
Stands for "Uniform Resource Locator." A URL is the address of a specific webpage or file on the
Internet. For example, the URL of the TechTerms website is "http://techterms.com." The address of this
page is "http://techterms.com/definition/url" and includes the following elements:
http:// – the URL prefix, which specifies the protocol used to access the location
While all website URLs begin with "http," several other prefixes exist. Below is a list of various URL
prefixes:
file - a file located on a local storage device (though not technically a URL because it does not refer to an
Internet-based location)
URI -
Stands for "Uniform Resource Identifier." A URI identifies the name and location of a file or resource in a
uniform format. It includes a string of characters for the filename and may also contain the path to the
directory of the file
URIs are similar to URLs in that they specify the location of a file. However, a URI may refer to all or part
a URL. For example, Apple's iMac Design URL is http://www.apple.com/imac/design.html. The URI of
this resource may be defined as just "design.html" or "/imac/design.html." These are called relative URIs
since they identify the resource relative to a specific location. The complete URL would be referred to as
an absolute URI
POST method is used for operations like storing, updating and ordering of data. The POST method is not
safe for repetitive use as it can threaten the user security over web. POST method can be used when
large amount of data needs to be sent to the server. There is no upper limit on the data that can be sent
to the server. The POST request message has a content body used to send parameters.
GET http://www.google.com/HTTP/1.1
2) HTTP Request Headers - The headers are used to communicate about the client. Some of the
headers used by the user are Content-Type, User-Agent, Accept-Encoding, Content-Length.
3) HTTP Request Body - The Request body contains the information to be sent to the HTTP server. The
HTTP header and the body are separated through a line. The blank line is a compulsory part to be
included in the body of the code.
HTTP Response
The user requests for a web page through the request object. HTTP response object is used to respond
back to the HTTP request submitted by the user. HTTP response object do not need a constructor. The
success of the HTTP response method can be determined by the code provided after processing the
request.
Version of Protocol
Status Code
Response Headers
Response body
1) Version Of Protocol - It is used to determine the version of the HTTP protocol used in the code.
2) Status Code - The Status Code determines the success of the response. The value ‘200’ states the
Status Code response. The value ‘404’ states that the requested file was not found at HTTP server
machine.
3) Date and Time - It specifies the Date and Time of the response generated by the server.
4) Response Headers - The Response Headers contain information about the server machine. The
headers are formed on the server machine. Some of the Response Headers are Content-Type, Content-
Length, and Last Modified.
5) Response Body - It contains the response to be delivered to the client. The HTML code is the body
of the content in the response.
Server-side Programming :
It is the program that runs on server dealing with the generation of content of web page.
6) Process user input. For example if user input is a text in search box, run a search algorithm on data
stored on server and send the results.
Examples :
1) PHP
2) C++
3) Java and JSP
4) Python
5) Ruby on Rails
Client-side Programming :
It is the program that runs on the client machine (browser) and deals with the user interface/display and
any other processing that can happen on client machine like reading/writing cookies.
1) Javascript
2) VBScript
3) HTML
4) CSS
5) AJAX
Application_Start: The method is called only once during the life cycle of an application. The method is
useful for performing tasks as loading data and initializing static values. The static data can be set only at
the start of the application.
Application_Error: The method can be used to raise during any phase of the application life cycle.
Application_BeginRequest: The event is called when the exception is thrown. The event is called only
when the first module raises an exception.
Application_EndRequest: The event is raised for every request in the application. It is used to clean up
the resources in the application.
Init: It is called when all the modules for an application are created.
Dispose: It is called for destroying the resources of the application. The method can manually release
the resources.
Application_End: The event is called once in the lifetime of the application. It is executed before the
application is unloaded.
Page request: The page request occurs before the life cycle of the page executed. ASP.NET checks
whether the page needs to be parsed or cached version to be sent to the user.
Start: The page properties Request and Response values are set in the Start phase of the page.
IsPostBack and UICulture property are set in the Start method.
Initialization. : In the Initialization phase, controls are available on the page. Every control has Unique
ID property.
Load: During the load phase, the request is post back and control properties are loaded with
information.
Rendering: The view state of the controls on the page is saved before rendering on the server. The
page calls the Render method for every control.
Unload: The event is raised after the control is completely rendered. The Request and Response
properties are unloaded and cleanup is performed.
Init: The Init event is raised after all controls are initialized. It is used to read or initialize the properties
of the control.
InitComplete: The event is raised after all initialization stage of the page is completed. It is used to
make changes to view state before post back occurs.
PreLoad: The event is raised after the page loads view state for all controls.
Load: The OnLoad method is called on the Page object. It is repeated for the child control present on
the page.
LoadComplete: The event is raised at the end of the event handling state.
PreRender: It is raised after the Page object has created all controls. The PreRender event is raised for
all controls and every child control on the page.
SaveStateComplete: The event is raised after view state and control state are saved for the page.
Render: The event is used to write the control markup to send to the browser.
Unload: The event is raised for every control and for the page itself.