[go: up one dir, main page]

0% found this document useful (0 votes)
542 views18 pages

Web Essentials: Client, Server and Communication

The document discusses the client-server model and HTTP communication protocol used on the web. It provides the following key points: - HTTP is the protocol for communication between web clients and servers. It uses a request-response model where the client initiates a request and the server sends a response. - Common HTTP request methods are GET and POST. GET adds data to the URL while POST sends it in the request body. - HTTP requests contain a start line with the method, URI, and version. Responses contain a status line with the version, status code, and reason phrase. Both can have header fields and bodies. - DNS maps domain names like yahoo.com to IP addresses so computers

Uploaded by

Aditya Kishan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
542 views18 pages

Web Essentials: Client, Server and Communication

The document discusses the client-server model and HTTP communication protocol used on the web. It provides the following key points: - HTTP is the protocol for communication between web clients and servers. It uses a request-response model where the client initiates a request and the server sends a response. - Common HTTP request methods are GET and POST. GET adds data to the URL while POST sends it in the request body. - HTTP requests contain a start line with the method, URI, and version. Responses contain a status line with the version, status code, and reason phrase. Both can have header fields and bodies. - DNS maps domain names like yahoo.com to IP addresses so computers

Uploaded by

Aditya Kishan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Web Essentials

C L I E N T, S E RV E R A N D
C O M M U N I C AT I O N
Client-Server Model
A file named
course.html

Client Internet vtop Server

http://vtop.com/course.html
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:hyper text transfer protocol
The hypertext transfer protocol (HTTP) was developed by Tim Berners-Lee in 1991
• HTTP was designed to transfer pages between machines
• The client (or Web browser) makes a request for a given page and the Server is responsible for
finding it and returning it to the client
• The browser connects and requests a page from the server
• The server reads the page from the file system, sends it to the client and terminates the
connection
HTTP Request Message
Every HTTP request message has the same basic structure:
◦ Start Line (request method, URI, HTTP version)
◦ Header field(s) (one or more)
◦ Blank line
◦ Message body (optional)

GET http:/tian/public_html/teaching.html HTTP/1.1


host: ww2.cs.fsu.edu
HTTP Request Method
GET and POST are the two methods used to transfer data from client to server in HTTP protocol

GET: adds the request to the URL and sends it to server

POST: send the request to the server through a request body in the header.
More Differences
HTTP Header Fields
The Host header field is required in every HTTP/1.1 request message.

Three major header fileds:


◦ Host: www.yahoo.com
◦ User-agent: Mozilla/5.0 (Windows)
◦ Accept: text/html, application/xml (MIME types)
◦ Content types that are acceptable for the response
Example of HTTP Request Message
Try to retrieve the file at
http://ww2.cs.fsu.edu/~tian/public_html/webDevelopment.html

GET /~tian/public_html/webDevelopment.html HTTP/1.1


Host: ww2.cs.fsu.edu
User-Agent: Mozilla9.0 (Windows)
Accept: text/html
HTTP Response Message
Every HTTP response message has the same basic structure:
◦ Status Line (HTTP version, status code, Reason Phrase)
◦ Header field(s) (one or more)
◦ Blank line
◦ Message body (optional)

HTTP/1.1 200 OK
HTTP/1.1 404 NOT FOUND
IP address and Domain Name
Every computer on the Internet has an IP address such as 192.0.34.166

Humans find it easier to refer to computers by names, such as yahoo.com. This is called
host/domain name.

DNS (Domain Name Service) provides a mechanism for mapping back and forth between IP
addresses and host names.
Client-Server Communication
What is the IP address of
“yahoo.com”

Client DNS
yahoo.com’s IP
address is
98.138.252.30
HTTP Request
HTTP Response

Yahoo
Server
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.
World wide web
The World Wide Web (WWW), commonly known as the Web, is an information system where
documents and other web resources are stored.
The documents are identified by Uniform Resource Locators (URLs, such as
https://www.example.com/).
The URLs may be interlinked by hypertext, and are accessible over the Internet.
The resources of the WWW may be accessed by users by a software application called a web
browser.
Next Class
History of HTML
Basic elements of HTML5
Write your first web page in HTML5

You might also like