Unit - Website Basics by DR - Smitha.P.S Associate Professor Velammal Engineering College
Unit - Website Basics by DR - Smitha.P.S Associate Professor Velammal Engineering College
By
Dr.Smitha.P.S
Associate Professor
Velammal Engineering College
WEBSITE
* The concept of Internet was originated in 1969 and has undergone several
technological & Infrastructural changes as discussed below:
* [7] The origin of Internet devised from the concept of Advanced Research
Project Agency Network (ARPANET).
«fi In 1972, the ARPANET spread over the globe with 23 nodes located at
different countries and thus became known as Internet.
lis es ="
~ y
#
_—
Disadvantages
i Internet }
Basic Internet Protocol:
TCP offers:
Reliability.
Full-duplex operation.
Data can be transmitted in both directions on a signal carrier at the same time
Multiplexing.
* Points to remember:
* Points to remember:
*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 uses port 21 for the contro! 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
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.
* plaintext
* hypertext
* image
* videos and
* Sounds
* ec.
HTTP: Hypertext Transport Protocol
* 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
* [t 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)
* The protocol does not require the server to remember anything about the
client between requests.
* Ifa 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)
ATTP is “stateless” ??
* the server does not respond by saying that it just served the object to
the client;
2. Server
window
HTTP connections
non-persistent HTTP
* Al 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 ts needed to serve multiple resources.
* Server leaves the connection open even after serving the request and closes
connection on
timeout.
Non-persistent HTTP
(contains text, and a
Uri + Verb
Request
Response Pa)
= wh Pp
start line/request
header field(s)
blank line/empty
optional body
7
General format of an HTTP raquast massage
Example: HTTP request message
request line {
(GET, POST, et GET /-zashariiWeb/SE432/SE432 himl ATTP/1.14r\n
HEAD commands) | Host: www. just.edu.jo\r\n
User-Agent: Firefox/3.6.10\r\n
header Accept: text/html ,application/xhtml+aml1\r\n
: Accept-Lanquage: en-us,en;q=0,5\r\n
Accept-Charset: IS0-86859-1,utf-8;q=0.7\r\n
of line indicates
and of header lines
HTTP Request: Start Line
* Start line
* Example: GET /~zasharif/Web/SE432/SE432. html HTTP/1.1
* 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)
* Standardized way to indicate the nature and format of a document (wt nec saa8)
* 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/himl, imageyjpeg
* Example header field with quality values:
* Referrer: URL of document containing link that supplied URI for this
HTTP request
HTTP Response
4. optional body
Status line.
Example: HTTP response message
—_— aR RV — ——
status line
(protocal
status i err 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS) \r\n
Last-Modified: Tua, 30 Get 2007 17:00:02 GMT\r\n
Efag: “l7?de6-a5ec-b£716880"\r\n
header Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=L00\r\n
Connection: Keep-Alive\ri\n
Content-Type: text/html; charset=IS0-8859-1\r\n
\ri\n
data data data data data ...
data, ar a
requested
HTML file
HTTP Response: Common header fields
* 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
* In return, the server responds with status codes and message payloads
* (ie. inden inn)
* 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:
* Lux: Informational Messages
* Dux: Successful
* Sxx: Redirection
© 4x: Client Error
* Sxx: Server Error
* Other two digits provide additional information
* See htto://www.w3.org/Protocols/rfic2616/rfic2616-sec10.html
And httos:/ /www.w3.org/Protocols/ric2616/ric2616.html
Common Status Codes
* 200 OR
* requested object moved, new location specified later in this msg (Location:)
302 Moved temporarily
= URL temporanly out of service, keep the old one but use this one for now
403 Forbidden
* No such document
408 Request Time-out, 504 Gateway Time-out
* 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
It is a software application