SlideShare a Scribd company logo
1 of 37
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.
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

Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler designKuppusamy P
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process CommunicationAdeel Rasheed
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference ModelMukesh Tekwani
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed systemishapadhy
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
World wide web architecture presentation
World wide web architecture presentationWorld wide web architecture presentation
World wide web architecture presentationImMe Khan
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
 
Congestion control
Congestion controlCongestion control
Congestion controlAman Jaiswal
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingVimal Dewangan
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systemsvampugani
 

What's hot (20)

Introduction to Application layer
Introduction to Application layerIntroduction to Application layer
Introduction to Application layer
 
3. challenges
3. challenges3. challenges
3. challenges
 
Osi model
Osi modelOsi model
Osi model
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
Tcp/ip server sockets
Tcp/ip server socketsTcp/ip server sockets
Tcp/ip server sockets
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Data link layer
Data link layer Data link layer
Data link layer
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
World wide web architecture presentation
World wide web architecture presentationWorld wide web architecture presentation
World wide web architecture presentation
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock Detection
 
System calls
System callsSystem calls
System calls
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shapingLeaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
 
Client Server Architecture ppt
Client Server Architecture pptClient Server Architecture ppt
Client Server Architecture ppt
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 

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

Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Nidhitransport
 
uniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxuniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxbmit1
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxAASTHAJAJOO
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basicspkaviya
 
Internet tools and services
Internet tools and servicesInternet tools and services
Internet tools and serviceslearnt
 
protocols-140826123206-phpapp01 (1).pdf
protocols-140826123206-phpapp01 (1).pdfprotocols-140826123206-phpapp01 (1).pdf
protocols-140826123206-phpapp01 (1).pdfALLIPURAMLAVANYA21K9
 
Network protocols
Network protocolsNetwork protocols
Network protocolsAbiud Orina
 
Computer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfComputer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfShanthalaKV
 
11 - ftp & web.ppt
11 - ftp & web.ppt11 - ftp & web.ppt
11 - ftp & web.pptssuserf7cd2b
 
Remote Login and File Transfer Protocols
Remote Login and File Transfer ProtocolsRemote Login and File Transfer Protocols
Remote Login and File Transfer ProtocolsHimanshu Pathak
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxhishamousl
 
Module notes artificial intelligence and
Module notes artificial intelligence andModule notes artificial intelligence and
Module notes artificial intelligence andbhagyavantrajapur88
 
Introduction to internet.
Introduction to internet.Introduction to internet.
Introduction to internet.Anish Thomas
 
Clients and Servers.ppt
Clients and Servers.pptClients and Servers.ppt
Clients and Servers.pptMohammed Ilyas
 

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)

Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02Hypertexttransferprotocolhttp 131012171813-phpapp02
Hypertexttransferprotocolhttp 131012171813-phpapp02
 
Compute rNetwork.pptx
Compute rNetwork.pptxCompute rNetwork.pptx
Compute rNetwork.pptx
 
uniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptxuniti-websitebasics-230517110223-12e31dbc (1).pptx
uniti-websitebasics-230517110223-12e31dbc (1).pptx
 
Module 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptxModule 5 Application and presentation Layer .pptx
Module 5 Application and presentation Layer .pptx
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
IT2255 Web Essentials - Unit I Website Basics
IT2255 Web Essentials - Unit I  Website BasicsIT2255 Web Essentials - Unit I  Website Basics
IT2255 Web Essentials - Unit I Website Basics
 
protocols (1).pptx
protocols (1).pptxprotocols (1).pptx
protocols (1).pptx
 
Internet tools and services
Internet tools and servicesInternet tools and services
Internet tools and services
 
protocols (1).pptx
protocols (1).pptxprotocols (1).pptx
protocols (1).pptx
 
protocols-140826123206-phpapp01 (1).pdf
protocols-140826123206-phpapp01 (1).pdfprotocols-140826123206-phpapp01 (1).pdf
protocols-140826123206-phpapp01 (1).pdf
 
Protocols
ProtocolsProtocols
Protocols
 
Network protocols
Network protocolsNetwork protocols
Network protocols
 
Computer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdfComputer Networks Module 1-part 1.pdf
Computer Networks Module 1-part 1.pdf
 
INTERNET TECHNOLOGY
INTERNET  TECHNOLOGYINTERNET  TECHNOLOGY
INTERNET TECHNOLOGY
 
11 - ftp & web.ppt
11 - ftp & web.ppt11 - ftp & web.ppt
11 - ftp & web.ppt
 
Remote Login and File Transfer Protocols
Remote Login and File Transfer ProtocolsRemote Login and File Transfer Protocols
Remote Login and File Transfer Protocols
 
Introduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptxIntroduction to the Internet and Web.pptx
Introduction to the Internet and Web.pptx
 
Module notes artificial intelligence and
Module notes artificial intelligence andModule notes artificial intelligence and
Module notes artificial intelligence and
 
Introduction to internet.
Introduction to internet.Introduction to internet.
Introduction to internet.
 
Clients and Servers.ppt
Clients and Servers.pptClients and Servers.ppt
Clients and Servers.ppt
 

More from smitha273566

More from smitha273566 (10)

Web services
Web servicesWeb services
Web services
 
Unit iv xml
Unit iv xmlUnit iv xml
Unit iv xml
 
Unit iv xml dom
Unit iv xml domUnit iv xml dom
Unit iv xml dom
 
Regular expression unit2
Regular expression unit2Regular expression unit2
Regular expression unit2
 
Html (1)
Html (1)Html (1)
Html (1)
 
Dom date and objects and event handling
Dom date and objects and event handlingDom date and objects and event handling
Dom date and objects and event handling
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Soa unit iv
Soa unit ivSoa unit iv
Soa unit iv
 
Unit iii soa
Unit iii soaUnit iii soa
Unit iii soa
 
It8074 soa-unit i
It8074 soa-unit iIt8074 soa-unit i
It8074 soa-unit i
 

Recently uploaded

Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 

Recently uploaded (20)

Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 

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.
  • 5.
  • 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.