What is the purpose of the 'Cache-Control' HTTP header? MCQ with Answer and Explanation

What is the purpose of the 'Cache-Control' HTTP header?
A. To specify caching policies for the resource
B. To set the language of the content
C. To control the format of the response
D. To authenticate the user
Answer: Option A
Solution (By JKSSB Mock Tests)
The Cache-Control header is used to define caching directives such as max-age, no-cache, and private, controlling how and for how long the resource can be cached.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Internet and Web Technologies Questions

Question #1
What is the primary operational distinction of a 'Web Server' compared to a traditional 'Database Server'?
A. A web server is purely a physical hardware chip; a database server is software.
B. A web server reads incoming email files exclusively via POP3 paths.
C. A web server is responsible for allocating local IP configurations dynamically.
D. A web server processes HTTP requests to deliver web page content; a database server manages structured data tables.

Correct Answer: Option D


Explanation:
Web servers (like Apache or Nginx) listen for HTTP requests to deliver HTML and web assets to browsers, while database servers (like MySQL or Oracle) store and query raw tabular data collections.

This question belongs to: Computer Internet and Web Technologies
Question #2
What does a '405 Method Not Allowed' HTTP status code return imply about a client browser's interaction with a web application?
A. The input security certificate has an expired authorization date.
B. The requested URL address path has changed its location permanently.
C. The web server facility has completely crashed down.
D. The server recognizes the request method, but the specific target resource does not support that method (e.g., trying to POST to a read-only static text file).

Correct Answer: Option D


Explanation:
An HTTP 405 error occurs when the requested resource is configured to reject the specific HTTP method used (such as a browser attempting a POST action on a static page designed only to accept GET requests).

This question belongs to: Computer Internet and Web Technologies
Question #3
What is the purpose of the 'User-Agent' header in HTTP requests?
A. To provide the user's IP address
B. To identify the client software making the request
C. To specify the preferred language
D. To authenticate the user

Correct Answer: Option B


Explanation:
The User-Agent header allows the server to identify the type of browser, operating system, and version, enabling content adaptation.

This question belongs to: Computer Internet and Web Technologies