What is the purpose of the 'Expires' header in HTTP? MCQ with Answer and Explanation

What is the purpose of the 'Expires' header in HTTP?
A. To specify the maximum age of the resource
B. To indicate when the response is no longer valid
C. To control the cache
D. To set the expiration time of a cookie
Answer: Option B
Solution (By JKSSB Mock Tests)
The Expires header gives the date/time after which the response is considered stale, used for caching control.

Discuss this Question (0)

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

Practice More Internet and Web Technologies Questions

Question #1
Which of the following is a technique to improve web security by setting limits on what resources can be loaded?
A. Content Security Policy (CSP)
B. Same-origin policy
C. All of the above
D. CORS

Correct Answer: Option A


Explanation:
CSP is a security feature that allows a site to define a whitelist of allowed sources for content, mitigating XSS and other attacks.

This question belongs to: Computer Internet and Web Technologies
Question #2
Which HTTP header field or mechanism is used by a web server to set a tracking cookie on the user's browser client?
A. Cookie-Transfer
B. Get-Cookie
C. Cache-Control
D. Set-Cookie

Correct Answer: Option D


Explanation:
The 'Set-Cookie' HTTP response header is sent by the server to direct the client web browser to store a specific cookie string locally.

This question belongs to: Computer Internet and Web Technologies
Question #3
Which of the following is a common technique to reduce the size of web resources for faster loading?
A. Image optimization
B. Compression (Gzip)
C. All of the above
D. Minification

Correct Answer: Option C


Explanation:
Minification, compression, and image optimization are all effective methods to reduce resource size and improve load times.

This question belongs to: Computer Internet and Web Technologies