SlideShare a Scribd company logo
UNIT I WEBSITE BASICS
By
Dr.Smitha.P.S
Associate Professor
Velammal Engineering College
WEBSITE
• A website is defined as a collection of web pages linked together that
has a unique domain name, that can be accessed from anywhere
across the globe over internet.
• It is hosted by a web server and viewed by web clients
• It can be developed in HTML, JavaScript, DHTML, PHP, etc.
Internet
• Internet is a world-wide global system of interconnected computer
networks.
• Internet uses the standard Internet Protocol (TCP/IP).
• Every computer in internet is identified by a unique IP address.
• IP Address is a unique set of numbers (such as 110.22.33.114) which
identifies a computer location.
• A special computer DNS (Domain Name Server) is used to give name to
the IP Address so that user can locate a computer by a name.
• For example, a DNS server will resolve a name
http://www.tutorialspoint.com to a particular IP address to uniquely
identify the computer on which this website is hosted.
• Internet is accessible to every user all over the world.
Internet Evolution
• The concept of Internet was originated in 1969 and has undergone several
technological & Infrastructural changes as discussed below:
• The origin of Internet devised from the concept of Advanced Research
Project Agency Network (ARPANET).
• ARPANET was developed by United States Department of Defense.
• Basic purpose of ARPANET was to provide communication among the
various bodies of government.
• Initially, there were only four nodes, formally called Hosts.
• In 1972, the ARPANET spread over the globe with 23 nodes located at
different countries and thus became known as Internet.
• By the time, with invention of new technologies such as TCP/IP protocols,
DNS, WWW, browsers, scripting languages etc.,Internet provided a
medium to publish and access information over the web.
Web essentials clients, servers and communication – the internet – basic internet protocols – world wide web – http request message – http response message – web clients – web servers
Basic Internet Protocol:
Transmission Control Protocol (TCP)
• TCP is a connection oriented protocol and offers end-to-end packet delivery. It acts as back bone
for connection.It exhibits the following key features:
• Transmission Control Protocol (TCP) corresponds to the Transport Layer of OSI Model.
• TCP is a reliable and connection oriented protocol.
TCP offers:
• Stream Data Transfer.
• Reliability.
• Efficient Flow Control
• Full-duplex operation.
Data can be transmitted in both directions on a signal carrier at the same time
• Multiplexing.
multiplexing is a method by which multiple analog or digital signals are combined into one signal
over a shared medium
• TCP offers connection oriented end-to-end packet delivery.
• TCP ensures reliability by sequencing bytes with a forwarding acknowledgement number that
indicates to the destination the next byte the source expect to receive.
• It retransmits the bytes not acknowledged with in specified time period.
Internet Protocol (IP)
• Internet Protocol is connectionless and unreliable protocol. It
ensures no guarantee of successfully transmission of data. In order to
make it reliable, it must be paired with reliable protocol such as TCP
at the transport layer.
• Points to remember:
• The length of datagram is variable.
• The Datagram is divided into two parts: header and data.
• The length of header is 20 to 60 bytes.
• The header contains information for routing and delivery of the
packet.
User Datagram Protocol (UDP)
• Like IP, UDP is connectionless and unreliable protocol. It doesn‘t
require making a connection with the host to exchange data. Since
UDP is unreliable protocol, there is no mechanism for ensuring that
data sent is received. UDP transmits the data in form of a datagram.
• Points to remember:
• UDP is used by the application that typically transmit small amount of
data at one time.
• UDP provides protocol port used i.e. UDP message contains both
source and destination port number, that makes it possible for UDP
software at the destination to deliver the message to correct
application program.
File Transfer Protocol (FTP)
• FTP is used to copy files from one host to another. FTP offers the
mechanism for the same in following manner:
• FTP creates two processes such as Control Process and Data Transfer
Process at both ends i.e. at client as well as at server.
• FTP establishes two different connections: one is for data transfer
and other is for control information.
• FTP uses port 21 for the control connection and Port 20 for the data
connection.
Trivial File Transfer Protocol (TFTP)
• Trivial File Transfer Protocol is also used to transfer the files but it
transfers the files without authentication. Unlike FTP, TFTP does not
separate control and data information. Since there is no authentication
exists, TFTP lacks in security features therefore it is not recommended to
use TFTP.
Key points
• TFTP makes use of UDP for data transport. Each TFTP message is carried in
separate UDP datagram.
• The first two bytes of a TFTP message specify the type of message.
• The TFTP session is initiated when a TFTP client sends a request to upload
or download a file.
• The request is sent from an ephemeral UDP port to the UDP port 69 of an
TFTP server.
World Wide Web
• The Web is the collection of machines (Web servers) on the Internet that provide
information,
• particularly HTML documents, via HTTP.
• Machines that access information on the Web are known as Web clients.
• A Web browser is software used by an end user to access the Web
Essential elements of the World Wide Web
are
• 1. web browsers - to surf the Web
• 2. server systems - to supply information to the browsers
• 3. computer networks – supports browser-server communication
What is a protocol and http?
• A Protocol is a standard procedure for defining and
regulating communication.
• i.e. TCP, UDP, HTTP, etc.
• HTTP is the foundation of data communication for
the World Wide Web
• The HTTP is the Web’s application-layer protocol for
transferring various forms of data between server and
client such as
• plaintext
• hypertext
• image
• videos and
• Sounds
• etc.
HTTP: Hypertext Transport Protocol
• HTTP is a form of communication protocol which specifies how web
clients and servers should communicate.
• The basic structure of HTTP follows a request-response model.
• A client always initiates a request message to the server; the server
generates a response message.
HTTP:
• It is the standard protocol for communication between web
browsers and web servers.
• It defines:
• how a client and server establish a connection,
• how the client requests data from the server
• how the server responds to that request
• how data is transferred from the server back to the client.
• and finally, how the connection is closed
• It assumes very little about a particular system, and does not keep
state between different message exchanges.
• This makes HTTP a stateless protocol.
• The communication usually takes place over TCP/IP,
• The default port for TCP/IP is 80, but other ports can also be
used.
Hypertext Transport Protocol (HTTP)
• HTTP is based on the request-response communication model:
• Client sends a request
• Server sends a response
• HTTP is a stateless protocol:
• The protocol does not require the server to remember anything about the
client between requests.
• If a particular client asks for the same object twice in a period of a few
seconds, the server does not respond by saying that it just served the object
to the client; instead, the server resends the object, as it has completely
forgotten what it did earlier.
HTTP overview (continued)
HTTP is “stateless” ??
• Server maintains no information about past client requests
• Server does not remember any previous requests.
• If a particular client asks for the same object twice in a period of a few
seconds,
• the server does not respond by saying that it just served the object to
the client;
• instead, the server resends the object, as it has completely forgotten
what it did earlier.
• protocols that maintain “state” are complex!
• past history (state) must be maintained
• if server/client crashes, their views of “state” may be inconsistent, must be
reconciled
HTTP: 2-17
How http works?
• HTTP is implemented in two programs:
• a client program and a server program,
executing on different end systems,
• talk to each other by exchanging HTTP
messages.
• The HTTP client first initiates a TCP
connection with the server. Once the
connection is established, the browser and
the server processes access TCP through
their socket interfaces.
HTTP
• Normally implemented over a TCP connection
• (80 is standard port number for HTTP)
• Typical browser-server interaction:
1. Client
• User enters Web address in browser
• Browser uses DNS to locate IP address
• Browser opens TCP connection to server
• Browser sends HTTP request over connection
2. Server
• Server sends HTTP response to browser over connection
3. Client
• Browser displays body of response in the client area of the browser
window
HTTP connections
non-persistent HTTP
• At most one object sent over TCP connection, connection then closed
• Downloading multiple objects required multiple connections
• Separate TCP connection is needed to serve each resource (object).
persistent HTTP
• Multiple objects can be sent over single TCP connection between client and server
• Single TCP connection is needed to serve multiple resources.
• Server leaves the connection open even after serving the request and closes connection on
timeout.
HTTP: 2-20
Non-persistent HTTP
suppose user enters URL:
1a. HTTP client initiates TCP
connection to HTTP server
(process) at
www.just.edu.jo
on port 80
2. HTTP client sends HTTP request
message (containing URL) into
TCP connection socket. Message
indicates that client wants object
from the folders:
Web/SE432/se432.html
1b. HTTP server at host
www.just.edu.jo waiting for TCP
connection at port 80. “accepts”
connection, notifying client
3. HTTP server receives request
message, forms response message
containing requested object, and
sends message into its socket
time
(contains text, and a
references to style.css )
www.just.edu.jo/~zasharif/Web/SE432/se432.html
HTTP: 2-21
Non-persistent HTTP (cont.)
5. HTTP client receives response
message containing html file, displays
html. Parsing html file, finds 10
referenced jpeg objects
6. Steps 1-5 repeated for each of the
referenced objects
4. HTTP server closes TCP
connection.
time
HTTP Messages
• Request and Response Message Formats
HTTP request message: general format
• Structure of the request:
1. start line/request
2. header field(s)
3. blank line/empty
4. optional body
Example: HTTP request message
• HTTP request message:
• ASCII (human-readable format)
request line
(GET, POST,
HEAD commands)
header
lines
carriage return,
line feed at start
of line indicates
end of header lines
GET /~zasharif/Web/SE432/SE432.html HTTP/1.1rn
Host: www.just.edu.jorn
User-Agent: Firefox/3.6.10rn
Accept: text/html,application/xhtml+xmlrn
Accept-Language: en-us,en;q=0.5rn
Accept-Encoding: gzip,deflatern
Accept-Charset: ISO-8859-1,utf-8;q=0.7rn
Keep-Alive: 115rn
Connection: keep-alivern
rn
carriage return character
line-feed character
HTTP Request: Start Line
• Start line
• Example: GET /~zasharif/Web/SE432/SE432.html HTTP/1.1
• Three space-separated parts:
• HTTP request method
• Request-URI (Uniform Resource Identifier)
• Request-URI is the portion of the requested URI that follows the host name (which is
supplied by the required Host header field)
• In addition to http, some other URL schemes are https, ftp, mailto, and file
• HTTP version
• We will cover 1.1, in which version part of start line must be exactly as shown
HTTP Request: Common Request Methods
• GET
• Used if link is clicked or address typed in browser
• No message-body in request with GET method
• POST
• Used when submit button is clicked on a form
• Form information contained in the message-body of request
• HEAD
• Requests that only header fields (no body) be returned in the response
HTTP Request: Header field(s)
• Header field structure:
• Field-name : Field-value
• Syntax
• Field name is not case sensitive
• Field value may continue on multiple lines by starting continuation lines with white space
• Field values may contain MIME types, quality values, and wildcard characters(*’s)
• Multipurpose Internet Mail Extensions (MIME)
• Standardized way to indicate the nature and format of a document (IETF RFC 6838)
• Convention for specifying content type of a message
• In HTTP, typically used to specify content type of the body of the response
• MIME content type syntax:
• top-level type / subtype
• Examples: text/html, image/jpeg
• Example header field with quality values:
accept: text/xml,text/html;q=0.9,text/plain;q=0.8, image/jpeg,
image/gif;q=0.2,*/*;q=0.1
HTTP Request: Common header fields
• Host: host name from URL (required)
• User-Agent: type of browser sending request
• Accept: MIME types of acceptable documents
• Connection: value close tells server to close connection after single
request/response
• Content-Type: MIME type of (POST) body, normally application/x-www-
form-urlencoded
• Content-Length: bytes in body
• Referrer: URL of document containing link that supplied URI for this
HTTP request
HTTP Response
• Structure of the response:
1. status line
2. header field(s)/lines
3. blank line
4. optional body
30
Example: HTTP response message
status line
(protocol
status code
status phrase)
header
lines
data, e.g.,
requested
HTML file
HTTP/1.1 200 OKrn
Date: Sun, 26 Sep 2010 20:09:20 GMTrn
Server: Apache/2.0.52 (CentOS)rn
Last-Modified: Tue, 30 Oct 2007 17:00:02 GMTrn
ETag: "17dc6-a5c-bf716880"rn
Accept-Ranges: bytesrn
Content-Length: 2652rn
Keep-Alive: timeout=10, max=100rn
Connection: Keep-Alivern
Content-Type: text/html; charset=ISO-8859-1rn
rn
data data data data data ...
HTTP Response: Common header fields
• Connection, Content-Type, Content-Length
• Date: date and time at which response was generated (required)
• Location: alternate URI if status is redirection
• Last-Modified: date and time the requested resource was last modified on the
server
• Expires: date and time after which the client’s copy of the resource will be out-of-
date
• ETag: a unique identifier (hashcode) for this version of the requested resource
(changes if resource changes)
HTTP Response: Status Codes
• The client can initiate requests to the server.
• In return, the server responds with status codes and message payloads
• (i.e. index.html)
• The status code is important and tells the client how to interpret the server response
• The HTTP specification defines certain number ranges for specific types of
responses
• Three-digit number
• First digit is class of the status code:
• 1xx: Informational Messages
• 2xx: Successful
• 3xx: Redirection
• 4xx: Client Error
• 5xx: Server Error
• Other two digits provide additional information
• See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
And https://www.w3.org/Protocols/rfc2616/rfc2616.html
Common Status Codes
• 200 OK
• Everything worked, here’s the data
• 301 Moved Permanently
• requested object moved, new location specified later in this msg (Location:)
• 302 Moved temporarily
• URL temporarily out of service, keep the old one but use this one for now
• 400 Bad Request
• There is a syntax error in your request
• 403 Forbidden
• You can’t do this, and we won’t tell you why
• 404 Not Found
• No such document
• 408 Request Time-out, 504 Gateway Time-out
• Request took too long to fulfill for some reason
• 505 HTTP Version Not Supported
Web Client
• Web client is a software that accesses a web server by
sending an HTTP request message and processing the
resulting HTTP response.
• Web Browser is a typical web client.
• IE, Firefox, Safari, etc
• Browser-Wars
• En.wikipedia.org/wiki/Browser_wars
• Each company trying to add features and performance to its
browser in order to increase its market share.
Server
• The primary feature of every web server is to accept
HTTP request from web client and return an
appropriate resource (if available) in the HTTP
response.
1. Wait for connection requests from a client.
2. Receive an HTTP request.
3. Finding the requested file and creates an HTTP
response that contains the file in the body of the
response message.
Web essentials clients, servers and communication – the internet – basic internet protocols – world wide web – http request message – http response message – web clients – web servers

More Related Content

What's hot (20)

PPTX
Transport layer protocol
N.Jagadish Kumar
 
PPTX
HTTP request and response
Sahil Agarwal
 
PPT
Java Servlets
BG Java EE Course
 
PPTX
World wide web architecture presentation
ImMe Khan
 
PPTX
HDLC and Point to point protocol
Kinza Razzaq
 
PPT
TCP/IP Protocols With All Layer Description
Shubham Khedekar
 
PPTX
Ado.Net Tutorial
prabhu rajendran
 
PPT
Internet architecture
Naman Rastogi
 
PPTX
Communication costs in parallel machines
Syed Zaid Irshad
 
PPTX
Query processing in Distributed Database System
Meghaj Mallick
 
PPTX
Computer Network - Network Layer
Manoj Kumar
 
PPTX
Multiplexing in mobile computing
ZituSahu
 
PPTX
Object Oriented Design
DivyaSure
 
PPT
Tcpip services and applications
Online
 
PPTX
Relationship Among Token, Lexeme & Pattern
Bharat Rathore
 
PPTX
Electronic mail - Computer Networks
Umme Jamal
 
PPTX
Concurrency Control in Distributed Database.
Meghaj Mallick
 
PPTX
Transmission Control Protocol (TCP)
k33a
 
PDF
PHP Loops and PHP Forms
M.Zalmai Rahmani
 
PPTX
Client & server side scripting
baabtra.com - No. 1 supplier of quality freshers
 
Transport layer protocol
N.Jagadish Kumar
 
HTTP request and response
Sahil Agarwal
 
Java Servlets
BG Java EE Course
 
World wide web architecture presentation
ImMe Khan
 
HDLC and Point to point protocol
Kinza Razzaq
 
TCP/IP Protocols With All Layer Description
Shubham Khedekar
 
Ado.Net Tutorial
prabhu rajendran
 
Internet architecture
Naman Rastogi
 
Communication costs in parallel machines
Syed Zaid Irshad
 
Query processing in Distributed Database System
Meghaj Mallick
 
Computer Network - Network Layer
Manoj Kumar
 
Multiplexing in mobile computing
ZituSahu
 
Object Oriented Design
DivyaSure
 
Tcpip services and applications
Online
 
Relationship Among Token, Lexeme & Pattern
Bharat Rathore
 
Electronic mail - Computer Networks
Umme Jamal
 
Concurrency Control in Distributed Database.
Meghaj Mallick
 
Transmission Control Protocol (TCP)
k33a
 
PHP Loops and PHP Forms
M.Zalmai Rahmani
 
Client & server side scripting
baabtra.com - No. 1 supplier of quality freshers
 

Similar to Web essentials clients, servers and communication – the internet – basic internet protocols – world wide web – http request message – http response message – web clients – web servers (20)

PPTX
INTERNET PROGRAMMING unit1 web essential
psaranya21
 
PPTX
IOT2.pptx is internet of things presentation
kaaraapatil
 
PDF
Hypertexttransferprotocolhttp 131012171813-phpapp02
Nidhitransport
 
PPTX
HyperText Transfer Protocol (HTTP)
Gurjot Singh
 
PPTX
Compute rNetwork.pptx
ShehryarFreelancer
 
PPTX
uniti-websitebasics-230517110223-12e31dbc (1).pptx
bmit1
 
PPTX
Module 5 Application and presentation Layer .pptx
AASTHAJAJOO
 
PPTX
Application layer protocols
FabMinds
 
PPTX
APPLICATION LAYER PROTOCOLS .pptx
ArnavPlayz
 
PPTX
protocols (1).pptx
ALLIPURAMLAVANYA21K9
 
PPTX
Internet tools and services
learnt
 
PPTX
OSI Application layer. tcp/ip application layer
artisticcc11
 
PPTX
protocols (1).pptx
SandeepAwasthi15
 
PDF
protocols-140826123206-phpapp01 (1).pdf
ALLIPURAMLAVANYA21K9
 
PPTX
Protocols
Sonali Chawla
 
PPTX
Network protocols
Abiud Orina
 
PDF
sockets SMTP Bmsce ppt information science and engineering
UtkarshaMahajan6
 
PDF
Computer Networks Module 1-part 1.pdf
ShanthalaKV
 
PPTX
INTERNET TECHNOLOGY
subhradeep mitra
 
PPT
11 - ftp & web.ppt
ssuserf7cd2b
 
INTERNET PROGRAMMING unit1 web essential
psaranya21
 
IOT2.pptx is internet of things presentation
kaaraapatil
 
Hypertexttransferprotocolhttp 131012171813-phpapp02
Nidhitransport
 
HyperText Transfer Protocol (HTTP)
Gurjot Singh
 
Compute rNetwork.pptx
ShehryarFreelancer
 
uniti-websitebasics-230517110223-12e31dbc (1).pptx
bmit1
 
Module 5 Application and presentation Layer .pptx
AASTHAJAJOO
 
Application layer protocols
FabMinds
 
APPLICATION LAYER PROTOCOLS .pptx
ArnavPlayz
 
protocols (1).pptx
ALLIPURAMLAVANYA21K9
 
Internet tools and services
learnt
 
OSI Application layer. tcp/ip application layer
artisticcc11
 
protocols (1).pptx
SandeepAwasthi15
 
protocols-140826123206-phpapp01 (1).pdf
ALLIPURAMLAVANYA21K9
 
Protocols
Sonali Chawla
 
Network protocols
Abiud Orina
 
sockets SMTP Bmsce ppt information science and engineering
UtkarshaMahajan6
 
Computer Networks Module 1-part 1.pdf
ShanthalaKV
 
INTERNET TECHNOLOGY
subhradeep mitra
 
11 - ftp & web.ppt
ssuserf7cd2b
 
Ad

More from smitha273566 (10)

PPTX
Web services
smitha273566
 
PPTX
Unit iv xml
smitha273566
 
PPTX
Unit iv xml dom
smitha273566
 
PPTX
Regular expression unit2
smitha273566
 
PPTX
Html (1)
smitha273566
 
PPTX
Dom date and objects and event handling
smitha273566
 
PPTX
Cascading style sheets
smitha273566
 
PPTX
Soa unit iv
smitha273566
 
PPTX
Unit iii soa
smitha273566
 
PPTX
It8074 soa-unit i
smitha273566
 
Web services
smitha273566
 
Unit iv xml
smitha273566
 
Unit iv xml dom
smitha273566
 
Regular expression unit2
smitha273566
 
Html (1)
smitha273566
 
Dom date and objects and event handling
smitha273566
 
Cascading style sheets
smitha273566
 
Soa unit iv
smitha273566
 
Unit iii soa
smitha273566
 
It8074 soa-unit i
smitha273566
 
Ad

Recently uploaded (20)

PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
smart lot access control system with eye
rasabzahra
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
Day2 B2 Best.pptx
helenjenefa1
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
smart lot access control system with eye
rasabzahra
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
fatigue in aircraft structures-221113192308-0ad6dc8c.pptx
aviatecofficial
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 

Web essentials clients, servers and communication – the internet – basic internet protocols – world wide web – http request message – http response message – web clients – web servers

  • 1. UNIT I WEBSITE BASICS By Dr.Smitha.P.S Associate Professor Velammal Engineering College
  • 2. WEBSITE • A website is defined as a collection of web pages linked together that has a unique domain name, that can be accessed from anywhere across the globe over internet. • It is hosted by a web server and viewed by web clients • It can be developed in HTML, JavaScript, DHTML, PHP, etc.
  • 3. Internet • Internet is a world-wide global system of interconnected computer networks. • Internet uses the standard Internet Protocol (TCP/IP). • Every computer in internet is identified by a unique IP address. • IP Address is a unique set of numbers (such as 110.22.33.114) which identifies a computer location. • A special computer DNS (Domain Name Server) is used to give name to the IP Address so that user can locate a computer by a name. • For example, a DNS server will resolve a name http://www.tutorialspoint.com to a particular IP address to uniquely identify the computer on which this website is hosted. • Internet is accessible to every user all over the world.
  • 4. Internet Evolution • The concept of Internet was originated in 1969 and has undergone several technological & Infrastructural changes as discussed below: • The origin of Internet devised from the concept of Advanced Research Project Agency Network (ARPANET). • ARPANET was developed by United States Department of Defense. • Basic purpose of ARPANET was to provide communication among the various bodies of government. • Initially, there were only four nodes, formally called Hosts. • In 1972, the ARPANET spread over the globe with 23 nodes located at different countries and thus became known as Internet. • By the time, with invention of new technologies such as TCP/IP protocols, DNS, WWW, browsers, scripting languages etc.,Internet provided a medium to publish and access information over the web.
  • 6. Basic Internet Protocol: Transmission Control Protocol (TCP) • TCP is a connection oriented protocol and offers end-to-end packet delivery. It acts as back bone for connection.It exhibits the following key features: • Transmission Control Protocol (TCP) corresponds to the Transport Layer of OSI Model. • TCP is a reliable and connection oriented protocol. TCP offers: • Stream Data Transfer. • Reliability. • Efficient Flow Control • Full-duplex operation. Data can be transmitted in both directions on a signal carrier at the same time • Multiplexing. multiplexing is a method by which multiple analog or digital signals are combined into one signal over a shared medium • TCP offers connection oriented end-to-end packet delivery. • TCP ensures reliability by sequencing bytes with a forwarding acknowledgement number that indicates to the destination the next byte the source expect to receive. • It retransmits the bytes not acknowledged with in specified time period.
  • 7. Internet Protocol (IP) • Internet Protocol is connectionless and unreliable protocol. It ensures no guarantee of successfully transmission of data. In order to make it reliable, it must be paired with reliable protocol such as TCP at the transport layer. • Points to remember: • The length of datagram is variable. • The Datagram is divided into two parts: header and data. • The length of header is 20 to 60 bytes. • The header contains information for routing and delivery of the packet.
  • 8. User Datagram Protocol (UDP) • Like IP, UDP is connectionless and unreliable protocol. It doesn‘t require making a connection with the host to exchange data. Since UDP is unreliable protocol, there is no mechanism for ensuring that data sent is received. UDP transmits the data in form of a datagram. • Points to remember: • UDP is used by the application that typically transmit small amount of data at one time. • UDP provides protocol port used i.e. UDP message contains both source and destination port number, that makes it possible for UDP software at the destination to deliver the message to correct application program.
  • 9. File Transfer Protocol (FTP) • FTP is used to copy files from one host to another. FTP offers the mechanism for the same in following manner: • FTP creates two processes such as Control Process and Data Transfer Process at both ends i.e. at client as well as at server. • FTP establishes two different connections: one is for data transfer and other is for control information. • FTP uses port 21 for the control connection and Port 20 for the data connection.
  • 10. Trivial File Transfer Protocol (TFTP) • Trivial File Transfer Protocol is also used to transfer the files but it transfers the files without authentication. Unlike FTP, TFTP does not separate control and data information. Since there is no authentication exists, TFTP lacks in security features therefore it is not recommended to use TFTP. Key points • TFTP makes use of UDP for data transport. Each TFTP message is carried in separate UDP datagram. • The first two bytes of a TFTP message specify the type of message. • The TFTP session is initiated when a TFTP client sends a request to upload or download a file. • The request is sent from an ephemeral UDP port to the UDP port 69 of an TFTP server.
  • 11. World Wide Web • The Web is the collection of machines (Web servers) on the Internet that provide information, • particularly HTML documents, via HTTP. • Machines that access information on the Web are known as Web clients. • A Web browser is software used by an end user to access the Web
  • 12. Essential elements of the World Wide Web are • 1. web browsers - to surf the Web • 2. server systems - to supply information to the browsers • 3. computer networks – supports browser-server communication
  • 13. What is a protocol and http? • A Protocol is a standard procedure for defining and regulating communication. • i.e. TCP, UDP, HTTP, etc. • HTTP is the foundation of data communication for the World Wide Web • The HTTP is the Web’s application-layer protocol for transferring various forms of data between server and client such as • plaintext • hypertext • image • videos and • Sounds • etc.
  • 14. HTTP: Hypertext Transport Protocol • HTTP is a form of communication protocol which specifies how web clients and servers should communicate. • The basic structure of HTTP follows a request-response model. • A client always initiates a request message to the server; the server generates a response message.
  • 15. HTTP: • It is the standard protocol for communication between web browsers and web servers. • It defines: • how a client and server establish a connection, • how the client requests data from the server • how the server responds to that request • how data is transferred from the server back to the client. • and finally, how the connection is closed • It assumes very little about a particular system, and does not keep state between different message exchanges. • This makes HTTP a stateless protocol. • The communication usually takes place over TCP/IP, • The default port for TCP/IP is 80, but other ports can also be used.
  • 16. Hypertext Transport Protocol (HTTP) • HTTP is based on the request-response communication model: • Client sends a request • Server sends a response • HTTP is a stateless protocol: • The protocol does not require the server to remember anything about the client between requests. • If a particular client asks for the same object twice in a period of a few seconds, the server does not respond by saying that it just served the object to the client; instead, the server resends the object, as it has completely forgotten what it did earlier.
  • 17. HTTP overview (continued) HTTP is “stateless” ?? • Server maintains no information about past client requests • Server does not remember any previous requests. • If a particular client asks for the same object twice in a period of a few seconds, • the server does not respond by saying that it just served the object to the client; • instead, the server resends the object, as it has completely forgotten what it did earlier. • protocols that maintain “state” are complex! • past history (state) must be maintained • if server/client crashes, their views of “state” may be inconsistent, must be reconciled HTTP: 2-17
  • 18. How http works? • HTTP is implemented in two programs: • a client program and a server program, executing on different end systems, • talk to each other by exchanging HTTP messages. • The HTTP client first initiates a TCP connection with the server. Once the connection is established, the browser and the server processes access TCP through their socket interfaces.
  • 19. HTTP • Normally implemented over a TCP connection • (80 is standard port number for HTTP) • Typical browser-server interaction: 1. Client • User enters Web address in browser • Browser uses DNS to locate IP address • Browser opens TCP connection to server • Browser sends HTTP request over connection 2. Server • Server sends HTTP response to browser over connection 3. Client • Browser displays body of response in the client area of the browser window
  • 20. HTTP connections non-persistent HTTP • At most one object sent over TCP connection, connection then closed • Downloading multiple objects required multiple connections • Separate TCP connection is needed to serve each resource (object). persistent HTTP • Multiple objects can be sent over single TCP connection between client and server • Single TCP connection is needed to serve multiple resources. • Server leaves the connection open even after serving the request and closes connection on timeout. HTTP: 2-20
  • 21. Non-persistent HTTP suppose user enters URL: 1a. HTTP client initiates TCP connection to HTTP server (process) at www.just.edu.jo on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket. Message indicates that client wants object from the folders: Web/SE432/se432.html 1b. HTTP server at host www.just.edu.jo waiting for TCP connection at port 80. “accepts” connection, notifying client 3. HTTP server receives request message, forms response message containing requested object, and sends message into its socket time (contains text, and a references to style.css ) www.just.edu.jo/~zasharif/Web/SE432/se432.html HTTP: 2-21
  • 22. Non-persistent HTTP (cont.) 5. HTTP client receives response message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of the referenced objects 4. HTTP server closes TCP connection. time
  • 23. HTTP Messages • Request and Response Message Formats
  • 24. HTTP request message: general format • Structure of the request: 1. start line/request 2. header field(s) 3. blank line/empty 4. optional body
  • 25. Example: HTTP request message • HTTP request message: • ASCII (human-readable format) request line (GET, POST, HEAD commands) header lines carriage return, line feed at start of line indicates end of header lines GET /~zasharif/Web/SE432/SE432.html HTTP/1.1rn Host: www.just.edu.jorn User-Agent: Firefox/3.6.10rn Accept: text/html,application/xhtml+xmlrn Accept-Language: en-us,en;q=0.5rn Accept-Encoding: gzip,deflatern Accept-Charset: ISO-8859-1,utf-8;q=0.7rn Keep-Alive: 115rn Connection: keep-alivern rn carriage return character line-feed character
  • 26. HTTP Request: Start Line • Start line • Example: GET /~zasharif/Web/SE432/SE432.html HTTP/1.1 • Three space-separated parts: • HTTP request method • Request-URI (Uniform Resource Identifier) • Request-URI is the portion of the requested URI that follows the host name (which is supplied by the required Host header field) • In addition to http, some other URL schemes are https, ftp, mailto, and file • HTTP version • We will cover 1.1, in which version part of start line must be exactly as shown
  • 27. HTTP Request: Common Request Methods • GET • Used if link is clicked or address typed in browser • No message-body in request with GET method • POST • Used when submit button is clicked on a form • Form information contained in the message-body of request • HEAD • Requests that only header fields (no body) be returned in the response
  • 28. HTTP Request: Header field(s) • Header field structure: • Field-name : Field-value • Syntax • Field name is not case sensitive • Field value may continue on multiple lines by starting continuation lines with white space • Field values may contain MIME types, quality values, and wildcard characters(*’s) • Multipurpose Internet Mail Extensions (MIME) • Standardized way to indicate the nature and format of a document (IETF RFC 6838) • Convention for specifying content type of a message • In HTTP, typically used to specify content type of the body of the response • MIME content type syntax: • top-level type / subtype • Examples: text/html, image/jpeg • Example header field with quality values: accept: text/xml,text/html;q=0.9,text/plain;q=0.8, image/jpeg, image/gif;q=0.2,*/*;q=0.1
  • 29. HTTP Request: Common header fields • Host: host name from URL (required) • User-Agent: type of browser sending request • Accept: MIME types of acceptable documents • Connection: value close tells server to close connection after single request/response • Content-Type: MIME type of (POST) body, normally application/x-www- form-urlencoded • Content-Length: bytes in body • Referrer: URL of document containing link that supplied URI for this HTTP request
  • 30. HTTP Response • Structure of the response: 1. status line 2. header field(s)/lines 3. blank line 4. optional body 30
  • 31. Example: HTTP response message status line (protocol status code status phrase) header lines data, e.g., requested HTML file HTTP/1.1 200 OKrn Date: Sun, 26 Sep 2010 20:09:20 GMTrn Server: Apache/2.0.52 (CentOS)rn Last-Modified: Tue, 30 Oct 2007 17:00:02 GMTrn ETag: "17dc6-a5c-bf716880"rn Accept-Ranges: bytesrn Content-Length: 2652rn Keep-Alive: timeout=10, max=100rn Connection: Keep-Alivern Content-Type: text/html; charset=ISO-8859-1rn rn data data data data data ...
  • 32. HTTP Response: Common header fields • Connection, Content-Type, Content-Length • Date: date and time at which response was generated (required) • Location: alternate URI if status is redirection • Last-Modified: date and time the requested resource was last modified on the server • Expires: date and time after which the client’s copy of the resource will be out-of- date • ETag: a unique identifier (hashcode) for this version of the requested resource (changes if resource changes)
  • 33. HTTP Response: Status Codes • The client can initiate requests to the server. • In return, the server responds with status codes and message payloads • (i.e. index.html) • The status code is important and tells the client how to interpret the server response • The HTTP specification defines certain number ranges for specific types of responses • Three-digit number • First digit is class of the status code: • 1xx: Informational Messages • 2xx: Successful • 3xx: Redirection • 4xx: Client Error • 5xx: Server Error • Other two digits provide additional information • See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html And https://www.w3.org/Protocols/rfc2616/rfc2616.html
  • 34. Common Status Codes • 200 OK • Everything worked, here’s the data • 301 Moved Permanently • requested object moved, new location specified later in this msg (Location:) • 302 Moved temporarily • URL temporarily out of service, keep the old one but use this one for now • 400 Bad Request • There is a syntax error in your request • 403 Forbidden • You can’t do this, and we won’t tell you why • 404 Not Found • No such document • 408 Request Time-out, 504 Gateway Time-out • Request took too long to fulfill for some reason • 505 HTTP Version Not Supported
  • 35. Web Client • Web client is a software that accesses a web server by sending an HTTP request message and processing the resulting HTTP response. • Web Browser is a typical web client. • IE, Firefox, Safari, etc • Browser-Wars • En.wikipedia.org/wiki/Browser_wars • Each company trying to add features and performance to its browser in order to increase its market share.
  • 36. Server • The primary feature of every web server is to accept HTTP request from web client and return an appropriate resource (if available) in the HTTP response. 1. Wait for connection requests from a client. 2. Receive an HTTP request. 3. Finding the requested file and creates an HTTP response that contains the file in the body of the response message.