0% found this document useful (0 votes)
41 views9 pages

Introduction of Web Server and Web Browser

The document discusses web servers, web browsers, HTTP protocol and their roles. A web server delivers web pages to clients using HTTP and has an IP address and domain name. Web browsers like Internet Explorer retrieve and display web pages using URLs. HTTP is the application protocol that defines message formats and actions for web servers.

Uploaded by

Onkar Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views9 pages

Introduction of Web Server and Web Browser

The document discusses web servers, web browsers, HTTP protocol and their roles. A web server delivers web pages to clients using HTTP and has an IP address and domain name. Web browsers like Internet Explorer retrieve and display web pages using URLs. HTTP is the application protocol that defines message formats and actions for web servers.

Uploaded by

Onkar Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1.

1 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.

Each Web Server must have the following two properties:

An IP address of the Web Server

Domain name of the Web Server used for communication

Web Server Architecture


The pictorial representation of the Web Server architecture is shown below. The main components of
server in the Client Server architecture are as mentioned below:

Data Server

Database Management Server (DBMS)

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

techterms.com – the server name or IP address of the server

/definition/url – the path to the directory or file

While all website URLs begin with "http," several other prefixes exist. Below is a list of various URL
prefixes:

http – a webpage, website directory, or other file available over HTTP

ftp – a file or directory of files available to download from an FTP server

news – a discussion located within a specific newsgroup

telnet – a Unix-based computer system that supports remote client connections

gopher – a document or menu located on a gopher server

wais - a document or search results from a WAIS database

mailto - an email address (often used to redirect browsers to an email client)

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

Comparison between HTTP GET and POST methods


User can interact with websites through GET and POST methods. Both the methods have respective
functionalities to be performed. GET method is useful for retrieving information from the URI. The
method can be re-issued again without effecting other operations in the system. It is safe to use over
the web browser. GET method can supply data in the form of cookies and query string.

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.

HTTP Request and Response Structure


HTTP Request
HTTP Request is used when the user wants to retrieve the information from a web server. When a user
visits a web page the HTTP Request to the web server through the HTTP protocol. The web server
receives the request, and it responds as a web page. For every page request the process is repeated.

The HTTP Request consists of the following components.

HTTP Request Method

HTTP Request Headers

HTTP Request Body

1) HTTP Request Method - The HTTP Request method syntax is

GET http://URL path/protocol version


For example, the HTTP request for the Google website will be

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.

The HTTP Response must contain the following fields:

Version of Protocol

Status Code

Date and Time

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 and Client side Programming

Server-side Programming :
It is the program that runs on server dealing with the generation of content of web page.

1) Querying the database

2) Operations over databases

3) Access/Write a file on server.

4) Interact with other servers.

5) Structure web applications.

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 :

The Programming languages for server-side programming are :

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) Interact with temporary storage

2) Make interactive web pages

3) Interact with local storage

4) Sending request for data to server

5) Send request to server

6) work as an interface between server and user

The Programming languages for client-side programming are :

1) Javascript

2) VBScript

3) HTML

4) CSS

5) AJAX

Life cycle of ASP.NET page


The life cycle of the ASP.NET page specifies how the page is instantiated and processed to generate the
specific output. There are different phases through which the page processing before rendering the
output on web. The life cycle of the ASP.NET can be divided into two parts as follows:

Application Life cycle

Page Life cycle

1) Application Life cycle:


In the application life cycle, the event is raised by the application. User must create a file Global.asax in
the root directory of the application. The Global.asax file is derived from HttpApplication class. The
HttpApplication class processes one request at a time. The events in the Global.asax file are
automatically bind by the ASP.NET application. There are several Application methods of Application.
The description of these methods and events are mentioned below:

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 Life Cycle:


The ASP.NET page when executed goes through a life cycle performing the processing steps. The life
cycle of the ASP.NET page is mentioned below:

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.

The life cycle of ASP.NET page event is as below:


PreInit: The event is raised before the start stage of the page is completed and the initialization phase
has started.

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.

You might also like