This page was translated from English by the community. Learn more and join the MDN Web Docs community.
Access-Control-Max-Age
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
Access-Control-Max-Age 응답 헤더는 preflight request의 결과(즉, Access-Control-Allow-Methods 및 Access-Control-Allow-Headers 헤더에 포함된 정보)를 얼마나 오래 캐시할 수 있는지를 나타냅니다.
| 헤더 유형 | Response header |
|---|---|
| Forbidden header name | no |
구문
http
Access-Control-Max-Age: <delta-seconds>
지시어
- <delta-seconds>
-
결과를 부호가 없는 음수가 아닌 정수로 캐시할 수 있는 최대 시간(초)입니다. Firefox는 24시간(86400초)으로 제한합니다. 크롬(v76 이전 버전)은 10분(600초)으로 제한됩니다. 크롬(v76부터)은 2시간(7200초)으로 제한됩니다. 기본값은 5초입니다.
예제
preflight 요청의 결과를 10분 동안 캐시합니다.
http
Access-Control-Max-Age: 600
명세서
| Specification |
|---|
| Fetch> # http-access-control-max-age> |
브라우저 호환성
Loading...