?
このドキュメントでは、 php中國語ネットマニュアル リリース
Access-Control-Max-Age
響應(yīng) header 指示多長時間的結(jié)果預(yù)檢請求(即包含在所述信息Access-Control-Allow-Methods
和Access-Control-Allow-Headers
的 headers )可以被緩存。
Header type | Response header |
---|---|
Forbidden header name | no |
Access-Control-Max-Age: <delta-seconds>
<delta-seconds> 結(jié)果可以被緩存的最大秒數(shù)。
Firefox 在24小時(86400秒)和10分鐘(600秒)的 Chromium 上限。Chromium 還指定了5秒的默認(rèn)值。
值為-1將禁用緩存,需要對所有呼叫進(jìn)行預(yù)檢選項檢查。
將預(yù)檢請求的結(jié)果緩存10分鐘:
Access-Control-Max-Age: 600
Specification | Status | Comment |
---|---|---|
FetchThe definition of 'Access-Control-Max-Age' in that specification. | Living Standard | Initial definition. |
Feature | Chrome | Firefox | Edge | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | 4 | 3.5 | 12 | 10 | 12 | 4 |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | 2.1 | (Yes) | (Yes) | 1.0 | (Yes) | 12 | 3.2 |