What must occur before a web browser can initiate an HTTP request to a web server?
A TCP connection must be established after a DNS lookup
If a webpage contains an HTML file that references two images and one CSS stylesheet, how many total HTTP requests will the browser likely send?
4
An HTTP response header contains the field ‘Content-Length: 56579’. What does this tell the web browser?
the number of bytes contained in the message body
Which HTTP request method is most often used when a user submits sensitive data through a web form?
POST
What is the primary difference between HTTP/2 and HTTP/3?
HTTP/3 uses UDP instead of TCP to transport data packets
A web server returns a status code of ‘301 Moved Permanently’. How will the browser react?
it will automatically load a new URL found in the ‘Location’ header
Which HTTP header is sent by the browser to check if a cached version of a page is still the same as the one on the server?
If-None-Match
What happens when a browser receives a ‘304 Not Modified’ status code?
the browser displays the version of the page it has stored in its local cache
HTTPS uses Transport Layer Security (TLS). After verifying the digital certificate, what is the next step in establishing an HTTPS connection?
the server and browser generate session keys to encrypt data
A web developer wants to ensure that a browser NEVER caches a specific sensitive resource. Which header should they use?
Cache-Control: no-store
Define MIME Type
Identifies the nature of the file being sent so the browser knows how to display it.
Define user-agent
A header identifying the browser and operating system making the request.
Define ETag
(Entity Tag)
A unique identifier for a specific version of a web resource.
Define If-None-Match
A request header where the browser provides its cached ETag to the server.
Define TLS
(Transport Layer Security)
The protocol used by HTTPS to encrypt data.
Define digital certificate
Issued by a trusted authority to verify a website’s identity for HTTPS.
What are the four parts of an HTTP request and response?
start line
zero or more headers
a blank line
optional message body
How does a browser know how many bytes to expect in a response body?
the Content-Length header
What is the difference between a 301 and a 302 status code?
301 is for permanent moves, while 302 (Found) is for temporary redirects.
How do max-age and no-store differ in the Cache-Control header?
max-age sets an “expiration date,” while no-store is a strict security instruction never to save the data to disk.
Why does HTTP/3 use UDP instead of TCP?
UDP avoids some of the overhead and “handshaking” delays required by TCP, making it faster.