Overview
- Web Pages consist of objects
- A web page is one base html page but with several referenced
objects
- Files can be in 3 states
- Static - no change
- Dynamic - input from client
- Active - program runs on client
- URL Defines 4 things
- Protocol; FTP, HTTP, HTTPS, TELNET
- Host Computer
- Port - optional
- Path; location of the file server
Protocol :// Host : Port / Path
https://augusta.edu:443/login
HTTP Connections
- non-persistent HTTP
- at most one object sent over TCP connection; connection then
closes
- downloading multiple objects required multiple connections
- persistent HTTP
- many objects can be sent over a single TCP connection
HTTP Request Message
- Two types of HTTP messages, request and response
- General Format:
method|URL|version|header field name|value
- Blank lines are the delimiter between the head and body
- POST method
- Web page often includes form inputs
- input is uploaded to server in entity body
- GET
- Loaded into the URL
- Most common
Status Response Codes
- 200 OK
- 301 Moved Permanently
- File has been moved, specified later in message
- This is usually when you try to access HTTPS with HTTP
- 400 Bad Request
- Request not understood by server
- 404 Not Found
- Requested file does not exist
- 500 HTTP Version not supported
Cookies
- Many sites use cookies for:
- cookie header line of http response message
- cookie header line of http request
- user’s cookie saved on host but managed by browser
- back-end database at website
- Examples
- When initial http request arrives at site, the site creates:
- unique id’s
- entry for back-end database
- Uses
- authorization
- shopping carts
- recommendations
- user session state
HTTP/2
- More use of pipe-lining/multiplexing for faster transfers
- Allows servers to push responses
- Header field now uses binary instead of plain text
- Moves encrypted data by default -> TLS