Q. In HTTP/1.1, what is the default behavior regarding persistent connections?
A.
Connections are always persistent
B.
Connections are never persistent
C.
Connections are persistent by default
D.
Connections require a special header
Show solution
Solution
In HTTP/1.1, connections are persistent by default, meaning that multiple requests can be sent over a single connection without reopening it.
Correct Answer:
C
— Connections are persistent by default
Learn More →
Q. In the context of web protocols, what does SSL stand for?
A.
Secure Socket Layer
B.
Simple Socket Layer
C.
Secure System Layer
D.
Simple System Layer
Show solution
Solution
SSL stands for Secure Socket Layer, which is a protocol for establishing a secure connection between a web server and a client.
Correct Answer:
A
— Secure Socket Layer
Learn More →
Q. What is the function of the 'Content-Type' header in an HTTP response?
A.
To specify the server type
B.
To indicate the type of content being sent
C.
To define the encoding type
D.
To manage cache settings
Show solution
Solution
The 'Content-Type' header in an HTTP response indicates the media type of the resource being sent, allowing the client to understand how to process it.
Correct Answer:
B
— To indicate the type of content being sent
Learn More →
Q. What is the main function of the 'Cache-Control' header in HTTP?
A.
To control the server load
B.
To manage client-side caching
C.
To specify the content type
D.
To authenticate users
Show solution
Solution
The 'Cache-Control' header is used to specify directives for caching mechanisms in both requests and responses, controlling how resources are cached.
Correct Answer:
B
— To manage client-side caching
Learn More →
Q. What is the primary purpose of the HTTP status code 404?
A.
Server Error
B.
Not Found
C.
OK
D.
Bad Request
Show solution
Solution
The HTTP status code 404 indicates that the requested resource could not be found on the server.
Correct Answer:
B
— Not Found
Learn More →
Q. What is the purpose of the 'Content-Type' header in an HTTP response?
A.
To specify the server type
B.
To indicate the type of content being sent
C.
To define the connection type
D.
To authenticate the user
Show solution
Solution
The 'Content-Type' header indicates the media type of the resource being sent in the HTTP response, helping the client understand how to process it.
Correct Answer:
B
— To indicate the type of content being sent
Learn More →
Q. What is the purpose of the 'User-Agent' header in an HTTP request?
A.
To identify the client software
B.
To specify the content type
C.
To manage caching
D.
To authenticate the user
Show solution
Solution
The 'User-Agent' header is used to identify the client software making the request, providing information about the browser and operating system.
Correct Answer:
A
— To identify the client software
Learn More →
Q. What is the role of the 'User-Agent' header in an HTTP request?
A.
To identify the client software
B.
To specify the content type
C.
To manage session state
D.
To control caching behavior
Show solution
Solution
The 'User-Agent' header in an HTTP request identifies the client software making the request, allowing the server to tailor responses accordingly.
Correct Answer:
A
— To identify the client software
Learn More →
Q. Which HTTP method is idempotent and safe?
A.
POST
B.
GET
C.
PUT
D.
DELETE
Show solution
Solution
The GET method is considered idempotent and safe, meaning it can be called multiple times without changing the state of the resource.
Correct Answer:
B
— GET
Learn More →
Q. Which HTTP method is idempotent, meaning it can be called multiple times without different outcomes?
A.
POST
B.
GET
C.
PUT
D.
DELETE
Show solution
Solution
The PUT method is idempotent, meaning that making the same request multiple times will not change the outcome beyond the initial application.
Correct Answer:
C
— PUT
Learn More →
Q. Which HTTP method is used to request data from a specified resource?
A.
POST
B.
GET
C.
PUT
D.
DELETE
Show solution
Solution
The GET method is used to request data from a specified resource, allowing clients to retrieve information from the server.
Correct Answer:
B
— GET
Learn More →
Q. Which of the following is a feature of HTTP/2 compared to HTTP/1.1?
A.
Text-based protocol
B.
Multiplexing
C.
Single request per connection
D.
No header compression
Show solution
Solution
HTTP/2 introduces multiplexing, allowing multiple requests and responses to be sent simultaneously over a single connection.
Correct Answer:
B
— Multiplexing
Learn More →
Q. Which of the following is a valid HTTP status code for a successful request?
A.
200
B.
301
C.
403
D.
500
Show solution
Solution
The HTTP status code 200 indicates a successful request, meaning the server has successfully processed the request.
Correct Answer:
A
— 200
Learn More →
Q. Which of the following is NOT a valid HTTP status code?
A.
200
B.
301
C.
404
D.
5050
Show solution
Solution
5050 is not a valid HTTP status code; valid codes are typically three digits, such as 200, 301, and 404.
Correct Answer:
D
— 5050
Learn More →
Q. Which protocol is commonly used to secure HTTP traffic?
A.
FTP
B.
SMTP
C.
HTTPS
D.
Telnet
Show solution
Solution
HTTPS (Hypertext Transfer Protocol Secure) is used to secure HTTP traffic by encrypting the data transmitted between the client and server.
Correct Answer:
C
— HTTPS
Learn More →
Showing 1 to 15 of 15 (1 Pages)