Professional Documents
Culture Documents
Unit-i Web Basics
Unit-i Web Basics
Prepared by
Dr.S.SAJITHABANU ASP/IT
Mohamed Sathak Engineering College
Unit I – Website Basics
Internet Overview – Fundamental computer network concepts –
Web Protocols – URL – Domain Name – Web Browsers and Web
Servers – Working principle of a Website – Creating a Website –
Client-side and server-side scripting.
Internet
• Internet is global system in which millions of computers are connected together, It
is basically a network of networks.
• Using internet many people can share resources and can communicate with each
other.
• To have internet service one must go to the service providers that means your
computer must be connected to Internet Service Providers (ISP) through phone-line
modem or DSL.
• There are some privately owned interest service providers from which we can hire
the internet services.
• The internet is the collection of computers that can communicate with one another
using TCP/IP over an open, global communications network.
World Wide Web (WWW)
• WWW is a collection of software and corresponding protocols used to
• This information is typically stored on the web pages and through web
• A device can be a host (or an end system) such as a large computer, desktop, laptop,
workstation, cellular phone, or security system.
• Personal Area Networks (PANs): It covers the area of 30 feet. The PANs are used
to develop network of laptops, mobile phones, media player and play stations.
Small office network can be built with PANs.
• Wide Area Networks (WANs): Interconnect LANs across normal telephone lines
and other media, thereby interconnecting geographically dispersed users.
• Each host on a TCP/IP network is assigned a unique 32-bit logical address that is
divided into two main parts: the network number and the host number.
• Link: A communications pathway that transfers data from one device to another.
• Types of Connection
o Point-to-point link
o Multipoint link
Fundamental Computer Network Concepts
• Physical topology refers to the way in which a network is laid out
physically.
o Mesh Topology
o Star Topology
o Bus Topology
o Ring Topology
Fundamental Computer Network Concepts
Protocol Layering
• In data communication and networking , a protocol defines the rules that both the
sender and receiver and all intermediate devices need to follow to be able to
communicate effectively.
Web Protocols
File Transfer Protocol (FTP)
• The file transfer protocol sets the rule for transferring files between
computers.
• When user wants to download a file from the server FTP is used.
• FTP uses two connections between client and server. One connection is
used for actual data transfer and other is used for control information
(used for commands). This separation of data and commands makes the
FTP more efficient.
Web Protocols
Hyper Text Transfer Protocol (HTTP)
• It is a request/response protocol.
• The agents are found at level of each interface connecting the managed
devices to the network. With the help of these agents information on the
different objects(such as switch, hub, routers) can be collected.
Web Protocols
Simple Mail Transfer Protocol (SMTP)
• With the help of mail transfer agent and user agent the SMTP sends and
receives the emails
Web Protocols
Post Office Protocol (POP3)
• It works only at the receiver ends and has no work at the sender’s end.
• The POP protocol has two parts: a client POP (i.e.,) the receiver’s POP
and a server POP (i.e.,) receiver's email server.
• The client opens TCP connection with receiver’s POP server. This client
must be authenticated first by using the user name and password . Then
client can receive the emails from the mailbox.
Web Protocols
Transmission Control Protocol (TCP)
• The TCP allows the transmission of arbitrary amount of data by breaking it into
stream of separate IP packets.
HTTP REQUEST
• Every HTTP request message has the same basic structure:
• Start line
• Header field(s)
• Blank line
• Message body (optional)
Hyper Text Transfer Protocol
HTTP REQUEST
• Every start line consists of three parts, with a single space used to separate adjacent
parts: 1. Request Method, 2. Request URI, 3. HTTP Version
1. Request Method
It defines the CONNECT method which is used during the web browser and server
communication.
It is always written in Upper Case letters.
The GET method is used when
a. You type a URL in address bar
b. When you click on some hyperlink which is present in the document
c. When browser downloads images for display within a HTML document
The POST method used to send information collected from user form.
Hyper Text Transfer Protocol
HTTP REQUEST
1. Request Method
METHOD DESCRIPTION
Return the resource specified by the request URI as the body of a
GET
response message.
Pass the body of this request message on as data to be processed by
POST
the resource.
Return a list of HTTP methods that may be used to access the resource
OPTIONS
specified.
Store the body of this message in the server and assign the specified
PUT
Request – URI to data stored to get future GET request message.
2. Request-URI
The Uniform Resource Identifier (URI) is a string used to identify the names or
resources on the Internet.
The URI is a combination of URL and URN.
The URL (Uniform Resource Locater) denotes the web address and URN (Uniform
Resource Name) denotes specific name of the place or a person or item.
URN Example: ISBN 978-81-8431-123-2 specifies the address of some book.
3. HTTP Version
The official version of HTTP is HTTP/1.1
The version string for HTTP/1.1 must appear in the start line with all capital letters
and no embedded space.
The header fields are in the form of field name and field value.
The structure of http request is
Hyper Text Transfer Protocol
HTTP RESPONSE
• The structure of response message is as follows:
• Status line
• Header fields
• Blank line
• Message body
Status Reason
Description
Code Phrase
200 OK A standard response for successful request
Shows that the request is fulfilled and a new resource is
201 Created
being created
When the request is accepted for processing but is not
202 Accepted
processed yet is denoted by this status code
The requested resource is not present currently but may be
404 Not found
available in future
The requested resource is present currently but the server is
403 Forbidden
not able to respond it.
Internal It is a generic error message that appears due to software
500
Server Error internal failure
Hyper Text Transfer Protocol
HTTP RESPONSE
• The header field in response message is similar to that of request message.
Header Field Description
Date Represents the date and time at which the response is generated
Server Name of the server which is responding
Last modified Represents the date and time at which the response is last modified
• The message body consist of response message
Example
HTTP/1.1200 OK
Date : Fri, 1 Jan 2010 07:59:01 GMT
Server : Apache/2.0.20(Unix) mod_perl/1.99_10 Perl/v5.8.4 mod_ssl/2.0.50 OpenSSL/0.9.7d DAV/2 PHP/4.3.8
Last-Modified: Mon,23Feb 2009 08:32:41 GMT
Accept-Ranges : bytes
Content-Length: 2010
Content-Type:text/html
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional //EN”>
<HTML> ..... </HTML>
Hyper Text Transfer Protocol
CACHE CONTROL
Cache is used as repository. Use of cache improves system performance.
Many web browser stores web pages viewed by the client in the cache memory.
HTTP TUNNELING
It is a mechanism by which the communication performed by various network
protocol is encapsulated by the HTTP protocol.
The application that wishes to communicate with a remote host opens an HTTP
connection to a mediator server.
Using HTTP request the host communicates with the mediator server by
encapsulating the actual communications within those requests.
The mediator server then unwraps the data and send to the remote destined host.
The remote host when sends the response to the requesting host, wraps the response
in the HTTP protocol and then the response is given.
URL
The Uniform Resource Locator (URL) is unique address for the file that has to be
accessed over the internet.
When anyone want to access some website, they have to enter its URL in the
address bar of the web browser.
Example: if you want to access www.google.com then you must specify its URL in
the address bar.
Sometimes instead of domain name serve IP address can also be use. For example,
http://192.168.0.1
But use of IP address as URL is not preferred because human cannot remember
numbers very easily, but they can remember names easily.
URL
Absolute URL: This type of URL contains both the domain name and
directory/page path. An absolute URL gives complete location information.
Syntax: protocol://domain/path
Relative URL: This type of URL contains the path excluding the domain
name. Relative path is used for reference to a given link of a file that exist within
the same domain. Thus, using relative URL writing of long path name can be
avoided.
Domain Name
• It is very difficult to remember numerical information, but it is simple to remember
the textual information.
• There are some top-level DNS such as com, org, edu, mil, net, uk, in and son on.
Domain Name
Working of DNS
• A client/server network communication protocol.
• Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted
into a name known as reverse DNS lookups.
• DNS implements a distributed database to store the name of all the hosts
available on the internet.
• If a client like a web browser sends a request containing a hostname, then a piece of
software, DNS resolver sends a request to the DNS server to obtain the IP address
of a hostname.
• If DNS server does not contain the IP address associated with a hostname, then it
forwards the request to another DNS server. If IP address has arrived at the resolver,
which in turn completes the request over the internet protocol.
Domain Name
Working of DNS
Web Browsers and Web Servers
Web Browsers
Web client is a kind of software that runs on the client’s machine.
This software sends the HTTP request to the server and then processes the HTTP
response.
The commonly used web browsers are (i) Internet explorer (ii) Mozilla Firefox
(iii) Netscape Navigator (iv) Opera (v) Google Chrome (vi) Safari.
Web browser supports variety of protocols but the most used protocol on the web
browser is Hyper Text Transfer Protocol (HTTP).
Web Browsers and Web Servers
Functions of Web Browsers
Reformats the URL and send a valid HTTP request.
When user gives the address of web site it is in the form of domain name. The web
browser coverts the DNS to corresponding IP address.
The web browser establishes a TCP connection with the web browser while
processing the user’s request.
The web browsers send the HTTP request to the web server.
The web server processes the HTTP request sent by the web browser and returns
the desired web page to the client machine. The web browser on the client’s
machine displays this web page in appropriate format.
Web Browsers and Web Servers
Web Browser Architecture
Web Browsers and Web Servers
Web Browser Architecture
User Interface: Using the user interface user interacts with the browser engine.
Browser Engine: The browser engine is responsible for querying the rendering
engine according to various input of user interfaces.
Rendering Engine: It is responsible for displaying the requested contents on the
screen. The rendering engine interprets the HTML, XML and JavaScript that
comprises the given URL and generates the layout that is displayed in the user
interface. The main component of rendering engine is HTML Parse. The job of the
HTML parser is to parse the HTML markup into parse tree.
JavaScript Interpreter: The interpreter executes the JavaScript code which is
embedded in a web page.
Web Browsers and Web Servers
Web Browser Architecture
Networking: The functionality of networking is to retrieve the URL using common
internet protocols such as HTTP and FTP. The networking is responsible to handle the
internet communication and security issues. The network component may use the
cache for retrieved documents. This feature is useful for increasing the response time.
User Interface Backend: It is basically used to draw the widgets like combo boxes
and windows.
Data Persistence: This is a small database created on local drives of the computer
where the browser is installed. The data storage manages use data such as bookmarks,
cookies, and preferences.
Web Browsers and Web Servers
Web Servers
Web server is a special type of server to which the web browser submits the request
of web page which is desired by the client.
There are some popularly used web server such as Apache and IIS from Microsoft.
Functions of Web Servers
1. The web servers accept the request from the web browsers.
2. The user request is processed by the web server.
3. The web server responds to the users by providing the services which they demand
for over the web browsers.
4. The web servers serve the web-based applications.
5. The DNS translate the domain names into the IP addresses.
6. The servers verify given address exists, find necessary files, run appropriate scripts
exchange cookies if necessary and returns back to the browser.
7. Some servers actively participate in session handling techniques.
Web Browsers and Web Servers
Working Principle of Web Servers
• Step 1: Web client requests for the
desired web page by providing the IP
address of the website.
• Step 2: The web server locates the
desired web page on the website and
responds by sending back the
requested page. If the page doesn’t
exist, it will send back the appropriate
error page.
• Step 3: The web browser receives the
page and renders it as required.
Web Browsers and Web Servers
Web Servers
1. Apache
• Features: Reliability and Efficiency.
• An open-source software. Freely available to anybody. Apache web server is best
suitable for UNIX systems but it can also be used on Windows box.
• The apache web server can be configured as per the requirements using the file
httpd.conf.
2. IIS
• The Internet Information Services or Internet Information Server is a kind of web
server provided by Microsoft.
• This server is most popular on Windows platform.
Web Browsers and Web Servers
Web Servers
3. Database server
• It have a lot of data to deal with a regular basis. If you have client-server
architecture where the clients need process data too frequently, it is better to work
with a databases server.
• All database functions are controlled by the database server.
• Examples of proprietary database servers include Oracle, DB2, Informix, and
Microsoft SQL Server.
• Examples of free software database servers include PostgreSQL.
Web Browsers and Web Servers
Web Servers
Web Browsers and Web Servers
Difference between Web server and Database server
Web server Database server
Web server makes use of the
languages like PHP, ASP, JSP. It The database server has its own specific
makes use of the protocols such as program language or query languages.
FTP and HTTP.
Web server is used to save the Database server deals with the storing and
static and dynamic content and managing the data of a computer or
pages of websites. computer programs.
Database server can manage the web
Web server only performs web-based
based, enterprise based or business-based
services.
services at the same time.
Apache HTTP Server, Microsoft
Internet Information Services (IIS)
Oracle, SAP, MySQL and DB2 are some
Google web Server (GWS) and Sun Java
common examples of database server.
System Web Server are examples of web
server.
Web Browsers and Web Servers
Difference between Apache and IIS
Apache web server IIS web server
Apache web server is useful on both
IIS web server is used on Windows
Unix based systems and on Windows
platform.
platform.
It is a vendor specific product and can be
It is an open-source product.
used on windows products only.
For IIS server, the behavior is controlled by
The Apache web server can be controlled modifying the window-based management
by editing the configuration file programs called IIS snap in. We can access
httpd.conf. IIS snap-in through the Control Panel
Administrative Tools.
Web Browsers and Web Servers
Difference between Application Server and Web Server
Application Server Web Server
A server that exposes business logic to client
A server that handles HTTP protocol.
applications through various protocols
including HTTP.
Application server is used to serve web-
based applications and enterprise applications Web server is used to serve web-based
(i.e servlets, JSP and EJB etc). Application application (i.e servlets and JSP)
servers may contain a web server internally.
Keeping HTML, PHP,ASP, etc files
To deliver various applications to
available for the web browsers to view
another device, it allows everyone in the
when a user accesses the site on the web,
network to run software off of the same
handles HTTP requests from
machine.
clients.
It makes use of distributed transaction and
It makes use if Servlets and JSP.
EJB’s.
Resource utilization is high. Resource utilization is low.
Working Principle of a Website
Features of Website Design
1. Quality Web Content
• People desire information in fast and reliable fashion.
• For business websites, content should include important information.
• Display high quality pictures of their products.
• Highlight for client testimonials.
2. Clear, User-friendly Navigation
• Allows visitors to quickly find the information needed.
• A search box is suggested to make it faster to reach more specific pages within a
website.
3. Simple and Professional Web Design
• A balanced distribution of contents and graphics is required.
• Slightly contrasting colors and clear fonts is also necessary.
Working Principle of a Website
Features of Website Design
4. Webpage Speed
• The website with heavy graphics, audio and video takes more time to load.
• Maintain the desirable speed of the website.
5. Search Engine Optimization
• This allows the insertion of search keywords in website content, an appropriate link
profile, social media signals.
6. Web Compatibility
• A web site should easily render on various resolutions, screen sizes, and browsers;
and with the increasing popularity of mobile devices, websites should function
properly on these types of devices.
Working Principle of a Website
Website Design Issues
Jean Kaiser has suggested following design goals for the web design:
1. Simplicity: Avoid lot of animations, huge amount of information, extreme visuals
and so on.
2. Identity: Web design driven by the objective of the web application, category of user
using it. A web engineer must work to establish an identity for the web application
through the design.
3. Consistency: The contents of the web application should be constructed consistently.
For example: text formatting, font style, the graphics design, color scheme and style.
hypermedia structure, navigation and content display.
4. Robustness: The users always expect robust contents and functions of the web
application. If any function or content is missing or insufficient, then that web
application will fail.
Working Principle of a Website
Website Design Issues
5. Navigability: The navigation should be simple and consistent. The design of
navigations should intuitive and predictable in nature.
6. Visual appeal: The web applications are most visual and most dynamic and aesthetic
in nature. The various factors of visual appeal are Look and feel of the content,
interface layout, color co-ordination, the balance of text, graphics and other media,
navigation mechanism and so on.
7. Compatibility: The web application can be used in variety of environment and
configuration such as different browsers, internet connection types, operating systems
and various browsers.
Creating a Website
Web site is a collection of web pages that are grouped together to achieve certain
task under single domain name.
Each web page may contain texts, photos, videos, social media buttons and so on.
Technically, a webpage is a special type of document written in scripting language
such as HTML, CSS, JavaScript and PHP.