Engineering Questions with Answers - Multiple Choice Questions

MCQs on HTTP

1 - Question

The number of objects in a Web page which consists of 4 jpeg images and HTML text is ________
a) 4
b) 1
c) 5
d) 7

View Answer

Answer: c
Explanation: 4 jpeg images + 1 base HTML file.




2 - Question

The default connection type used by HTTP is _________
a) Persistent
b) Non-persistent
c) Can be either persistent or non-persistent depending on connection request
d) None of the mentioned

View Answer

Answer: a
Explanation: By default the http connection is issued with persistent connection. In persistent connection server leaves connection open after sending response. As little as one RTT (Time for a small packet to travel from client to server and back) is required for all referenced objects.




3 - Question

The time taken by a packet to travel from client to server and then back to the client is called __________
a) STT
b) RTT
c) PTT
d) JTT

View Answer

Answer: b
Explanation: RTT stands for round-trip time.




4 - Question

The HTTP request message is sent in _________ part of three-way handshake.
a) First
b) Second
c) Third
d) Fourth

View Answer

Answer: c
Explanation: In first step client sends a segment to establish a connection with the server. In the second the step the client waits for the acknowledgement to be received from the server. After receiving the acknowledgement, the client sends actual data in the third step.




5 - Question

In the process of fetching a web page from a server the HTTP request/response takes __________ RTTs.
a) 2
b) 1
c) 4
d) 3

View Answer

Answer: b
Explanation: By default the http connection will be persistent connection. Hence it will take only 1 RTT to fetch a webpage from a server.




6 - Question

The first line of HTTP request message is called _____________
a) Request line
b) Header line
c) Status line
d) Entity line

View Answer

Answer: a
Explanation: The line followed by request line are called header lines and status line is the initial part of response message.




7 - Question

The values GET, POST, HEAD etc are specified in ____________ of HTTP message
a) Request line
b) Header line
c) Status line
d) Entity body

View Answer

Answer: a
Explanation: It is specified in the method field of request line in the HTTP request message.




8 - Question

The __________ method when used in the method field, leaves entity body empty.
a) POST
b) SEND
c) GET
d) PUT

View Answer

Answer: c
Explanation: There are two methods which help to request a response from a server. Those are GET and POST. In GET method, the client requests data from server. In POST method the client submits data to be processed to the server.




9 - Question

The HTTP response message leaves out the requested object when ____________ method is used
a) GET
b) POST
c) HEAD
d) PUT

View Answer

Answer: c
Explanation: HEAD method is much faster than GET method. In HEAD method much smaller amount of data is transferred. The HEAD method asks only for information about a document and not for the document itself.




10 - Question

Find the oddly matched HTTP status codes
a) 200 OK
b) 400 Bad Request
c) 301 Moved permanently
d) 304 Not Found

View Answer

Answer: d
Explanation: 404 Not Found.




11 - Question

Which of the following is not correct?
a) Web cache doesnt has its own disk space
b) Web cache can act both like server and client
c) Web cache might reduce the response time
d) Web cache contains copies of recently requested objects

View Answer

Answer: a
Explanation: Web cache or also known as HTTP cache is a temporary storage where HTML pages and images are stored temporarily so that server lag could be reduced.




12 - Question

The conditional GET mechanism
a) Imposes conditions on the objects to be requested
b) Limits the number of response from a server
c) Helps to keep a cache upto date
d) None of the mentioned

View Answer

Answer: c
Explanation: The HTTP protocol requests the server of the website its trying to access so that it can store its files, images etc. in cache memory. This request of asking the server for a document considering a specific parameter is called conditional GET Request.




13 - Question

Which of the following is present in both an HTTP request line and a status line?
a) HTTP version number
b) URL
c) Method
d) None of the mentioned

View Answer

Answer: a
Explanation: Status line is the the start line of an HTTP response. It contains the information such as the protocol version, a status text, status code.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners