Browser & Web Performance · Middle · Question 50 of 75
What does Access-Control-Max-Age do?
- 1Sets the cookie lifetime for cross-origin requests
- 2Limits how long the actual response can be cached
- ✓Correct answer: Lets the browser cache the preflight result for a period, avoiding a new
OPTIONSrequest each time
Explanation
Browsers cap the value (for example, Chrome uses at most 2 hours), but even short caching removes many round trips.