What does HTTP stand for?
Hyper Text Transfer Protocol
What is HTTP?
(focus on HTTP/1.1)
In an HTTP response header, what would A and B refer to for content-type: A/B
A is the type of media e.g. text
B is the actual content type of the payload e.g. HTML
Type A/subtype B
e.g. text/html
What are the three common HTTP methods?
GET
- request specific page/object
- request has header only, no message body
HEAD
- request only header, not object itself
- can check timestamp against local cache
- request has header only, no message body
POST
- send form data to server
- request body contains form data
What are the HTTP response code types? Give some examples
Types: 1xx Informational 2xx Successful 3xx Redirection 4xx Client error 5xx Server error
Examples: 200 OK 301 Moved permanently 404 Not found 502 Bad Gateway
What does it mean for HTTP to be stateless?
What is the main difference between HTTP 1.0 and HTTP 1.1 when fetching a page.
(A TCP connection must first be established)
HTTP 1.0 - closes TCP connection and creates a new one for every object linked on page
[Connection: close]
HTTP 1.1 - TCP connection kept open to fetch multiple objects
(reduced overhead)
[Connection: keep-alive]
Properties of HTTP/2
Properties of HTTP/3
What is the cache?
What is a proxy?
Something (system or router) that takes the place of the client to communicate with the server
For caching, state some example header fields from requester and responder
Requester - max-age - min-fresh - max-stale Responder - must-revalidate - no-cache - no-store etc.