Bird
0
0

Which of the following is the correct syntax to set a Cache-Control header to cache content for 3600 seconds?

easy📝 Syntax Q12 of 15
Rest API - Request and Response Format
Which of the following is the correct syntax to set a Cache-Control header to cache content for 3600 seconds?
A"Cache-Control: max-age=3600"
B"Cache-Control: timeout=3600"
C"Cache-Control: expires=3600"
D"Cache-Control: duration=3600"
Step-by-Step Solution
Solution:
  1. Step 1: Recall Cache-Control max-age syntax

    The correct way to specify caching time in seconds is using max-age=seconds.
  2. Step 2: Check each option's correctness

    Only "Cache-Control: max-age=3600" uses max-age=3600, which is valid. Others use invalid directives.
  3. Final Answer:

    "Cache-Control: max-age=3600" -> Option A
  4. Quick Check:

    max-age sets cache time [OK]
Quick Trick: Use max-age to set cache time in seconds [OK]
Common Mistakes:
  • Using 'timeout' instead of 'max-age'
  • Confusing Cache-Control with Expires header syntax
  • Using unsupported directives like 'duration'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes