1.3 HTTP Flashcards

(21 cards)

1
Q

What must occur before a web browser can initiate an HTTP request to a web server?

A

A TCP connection must be established after a DNS lookup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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?

A

4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An HTTP response header contains the field ‘Content-Length: 56579’. What does this tell the web browser?

A

the number of bytes contained in the message body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which HTTP request method is most often used when a user submits sensitive data through a web form?

A

POST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the primary difference between HTTP/2 and HTTP/3?

A

HTTP/3 uses UDP instead of TCP to transport data packets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A web server returns a status code of ‘301 Moved Permanently’. How will the browser react?

A

it will automatically load a new URL found in the ‘Location’ header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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?

A

If-None-Match

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What happens when a browser receives a ‘304 Not Modified’ status code?

A

the browser displays the version of the page it has stored in its local cache

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

HTTPS uses Transport Layer Security (TLS). After verifying the digital certificate, what is the next step in establishing an HTTPS connection?

A

the server and browser generate session keys to encrypt data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A web developer wants to ensure that a browser NEVER caches a specific sensitive resource. Which header should they use?

A

Cache-Control: no-store

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define MIME Type

A

Identifies the nature of the file being sent so the browser knows how to display it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define user-agent

A

A header identifying the browser and operating system making the request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define ETag

A

(Entity Tag)
A unique identifier for a specific version of a web resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define If-None-Match

A

A request header where the browser provides its cached ETag to the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define TLS

A

(Transport Layer Security)
The protocol used by HTTPS to encrypt data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define digital certificate

A

Issued by a trusted authority to verify a website’s identity for HTTPS.

17
Q

What are the four parts of an HTTP request and response?

A

start line
zero or more headers
a blank line
optional message body

18
Q

How does a browser know how many bytes to expect in a response body?

A

the Content-Length header

19
Q

What is the difference between a 301 and a 302 status code?

A

301 is for permanent moves, while 302 (Found) is for temporary redirects.

20
Q

How do max-age and no-store differ in the Cache-Control header?

A

max-age sets an “expiration date,” while no-store is a strict security instruction never to save the data to disk.

21
Q

Why does HTTP/3 use UDP instead of TCP?

A

UDP avoids some of the overhead and “handshaking” delays required by TCP, making it faster.