Escolar Documentos
Profissional Documentos
Cultura Documentos
HTTP (HTML)
IT Workshop 2011 Sudhir Gupta
1/7/11
W3C
Get more info at: http://www.isoc.org/internet/history/
1/7/11
01010
0 1 0 1 0
01010
make network simple and reliable a connect segments, address (locating points on graph) and route (navigating graph) 01010 01010
Protocol Stack
Were here.
1/7/11
Servers
Hardware server
Computer on Internet, always running
Software server
Program running on server Listening on port
Receives requests, processes them, makes outgoing calls
Applications
Traditional PC applications
Everything done locally Fast but sharing difficult Word, Excel
Client/server applications
Client local and responsive Client provides interface Server centralizes resources Server performs some work
1/7/11
1/7/11
Client
response (HTML, )
Server
1/7/11
Protocol (Scheme)
Host Name
1/7/11
Port
Path
1/7/11
Request
Just a string of ASCII text GET /food/index.html HTTP/1.0\r\n\r\n
HTTP Server
Listens on port 80 (usually) Handles HTTP requests Sends back responses Document root is a directory in the file system Server maps path to file system file
1/7/11
Response Example
HTTP/1.1 200 OK Date: Fri, 16 Apr 2004 18:48:13 GMT Server: Apache/1.3.29 (Darwin) Last-Modified: Fri, 16 Apr 2004 10:15:59 GMT ETag: "58db37-89-407fb25f" Accept-Ranges: bytes Content-Length: 137 Connection: close Content-Type: text/html <html> <body> <p>Welcome</p> <img src=smiley.gif"> </body> </html>
HTTP Header
Blank line
Data
10
1/7/11
Client sends
GET /food/index.html HTTP/1.0\r\n\r\n
Server sees request with path /food/index.html Server maps onto Document Root
G:/webroot + /food/index.html
HTML Characteristics
Just a Text File!
+ Portable + Human Readable/Writable
11
1/7/11
Document Structure
<html> <head><title>My First Web Page</title> </head> <body bgcolor="white"> <p>A Paragraph of Text.</p> </body> </html>
Nested Tags
Like a tree, each element is contained inside a parent element Each element may have any number of attributes
<html>...</html>
12
1/7/11
13
1/7/11
14
1/7/11
15
1/7/11
16
1/7/11
17
1/7/11
18
1/7/11
19
1/7/11
20
1/7/11
21
1/7/11
22
1/7/11
23
1/7/11
24
1/7/11
25
1/7/11
26
1/7/11
27