Professional Documents
Culture Documents
uk
CSC1014
JISC Netskills
CSC1014
Definition Network of interlinked information Linking related information for navigation Worldwide network of networks using IP Document accessible on the Web via a URI Collection of related Web pages Application (user agent) to request and display Web pages Program that receives & responds to HTTP request Server where requested resource resides Web component in the request path between client and origin server (proxies, gateways)
CSC1014
HTML/XHTML: HyperText Markup Language Plus DNS: Domain Name System TCP/IP: Internet Protocol Suite
JISC Netskills
CSC1014
URI: Anatomy
A Uniform Resource Identifier identifies a resource on the internet and is independent of current location
Generic Scheme
http:
Authority
//www.cs.ncl.ac.uk
Path
/teaching/
Query
?m=3504
Fragment
#cwork
Query
?subject=Hello
CSC1014
http://www.w3.org/TR/uri-clarification/#contemporary
CSC1014
Each request/response pair is an independent exchange. No protocol level maintenance of state (for scalability)
JISC Netskills
CSC1014
A Simple Request
DNS server
2. Client makes a DNS query "Where is www.netskills.ac.uk?" 1. User types URL (or clicks a link) 4. TCP connection established (2-way) 5. HTTP request (from client) 6. HTTP response (from server) 7. Browser processes & displays response
JISC Netskills
at 128.240.233.249
Web server
CSC1014
HTTP methods
The operations carried out over HTTP
HEAD, GET, POST, PUT, DELETE etc
GET returns current state and content of resource HEAD just returns response metadata
i.e. a GET without the body (content)
JISC Netskills
CSC1014
HTTP headers
Headers are the metadata for the request/response exchange Some are generic and apply to both request and response e.g.
Date -> the date/time stamp for the message Cache-Control -> instructions for en-route caching (or not)
Understanding the reading, setting and manipulation HTTP headers is very useful for managing a web site Be aware that headers can be spoofed not good!
JISC Netskills
CSC1014
Info about the resource (content) Content-Type etc Hop-by-hops can be read, stripped or added to en-route
CSC1014
* Safe does not change state of resource ** Idempotent... the side effects of repeated, identical requests are the same as for a single request
JISC Netskills
CSC1014
Examples 100 Continue 101 Switching Protocols 200 OK 201 Created 204 No Content 300 Multiple Choices 301 Moved Permanently 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 500 Internal Server Error
CSC1014
JISC Netskills
CSC1014
Entity body
JISC Netskills
CSC1014
A cache stores HTTP messages to reduce user-perceived latency, network traffic and server load
HTTP provides extensive cache control support (what can/cannot be cached, when to invalidate entries etc.)
JISC Netskills
CSC1014
Standardisation
Standards promote interoperability between client and server software from different providers
Client has a clear expectation of valid responses to a request; Server can unambiguously interpret a request Levels the playing field; can promote innovation (and inhibit it!)
IETF for evolution of Internet and protocols (incl. HTTP) W3C for representation of content (incl. HTML), architecture, social and legal issues, accessibility
JISC Netskills