|
|
Basically
the World Wide Web can be regarded as an example of client-server architecture.
It consists of millions of servers and clients which are connected via wired or
wireless networks.
The users request the web server for the resources like HTML
pages, documents, images, video or sound files through the web browser.
(a) Mapping IP
Address:
Whenever
we want to view a web page, we just type the URL of the web page in the address
bar of the browser.
|
This URL contains the domain name of the server to which that
web page belongs to. Then the browser connects us to the primary DNS server. This
DNS server finds the IP address corresponding to that domain name.
If the IP address
is found, then the browser connects our computer to the web server with that IP
address. If we request for a domain name which is not in the DNS server then it
re-directs the request to some other DNS server.
There
is a distributed database for maintaining the computer names and the corresponding
IP addresses on the Internet. This is called Domain Name Service (DNS). Each DNS
servers hold the subset of the DNS database. Usually we specify one primary and
one secondary DNS servers at the initial set up of internet connection.
(b) Sending HTTP
Request:
Generally
servers and clients use HTTP for communication. So, the request made by the user
through the browser is an HTTP request.
After
finding the web server using the corresponding IP address, the browser connects
our computer to the web server and sends the HTTP request through the TCP/IP protocol
stack for the required web page.
(c) Sending HTTP
Response:
The HTTP
request is received by the web server and searches for the required resource. If
the server finds the resource then the server sends an HTTP response.
If the
response is a HTML page, then the HTTP appends the header information to it which
is useful for the browser to process that HTML page. This header contains the information
like the status of the request, content type, and the protocol.
|
|
If the
server is not able to find the required resource then “404 Not Found” error will
be displayed in our browser. The connection with the web server will be closed whenever
the required web page is received by the browser.
The browser
then parses through the page and looks for other page elements it needs to complete
the web page. These usually include images, applets, etc.
(d) Loading additional
elements:
If the web page we have requested contains the additional elements like pictures,
video files etc then the browser is going to make additional HTTP request to the
server for each element to be loaded. Again the process of HTTP request and HTTP
response repeats. After the browser finishes loading all the elements in page we
can see the complete web page.
|
|