You set Access-Control-Max-Age: 86400 so the browser would stop sending an OPTIONS request before every API call. In DevTools the OPTIONS requests keep coming: one every 10 minutes in Safari, one every 2 hours in Chrome, and a fresh one for every new resource URL. Which number is the browser really using?
Short answer: the smaller of your value and the browser’s own cap. Chromium caps it at 2 hours (7,200 seconds), Firefox at 24 hours (86,400 seconds) and WebKit, the engine behind Safari, at 10 minutes (600 seconds). With no header the cache lasts 5 seconds. The entry is also stored per full request URL, so a long max-age never saves the preflight for a URL the browser has not called yet. Specs and browser source were read on December 1, 2026.
What each engine does with the value
The Fetch Standard says to read Access-Control-Max-Age from the preflight response, use 5 if it is missing or unparsable, and lower it to “an imposed limit” the browser chooses. It does not name a number. The numbers come from each engine’s code:
| Engine | Cap | No header | Value it cannot parse | Negative or 0 | Source |
|---|---|---|---|---|---|
| Chromium (Chrome, Edge) | 2 hours (7,200 s) | 5 s | 5 s | Not cached | preflight_result.cc |
| Firefox | 24 hours (86,400 s) | 5 s | Not cached | Not cached | nsCORSListenerProxy.cpp |
| WebKit (Safari) | 10 minutes (600 s) | 5 s | 5 s | Expires at once | CrossOriginPreflightResultCache.cpp |
MDN’s page for the header lists the same three caps and adds that Chromium before version 76 capped at 10 minutes. In Chromium’s source the maximum is written as base::Hours(2), and the WebKit comment gives the reason for its low cap: it should be “short enough to minimize the risk of using a poisoned cache after switching to a secure network.”
Two spec-versus-code differences matter if you test with a typo. The specification says an unparsable value becomes 5 seconds. Chromium and WebKit do that, but Firefox’s code returns before storing anything, so the preflight is never cached there.
What your header becomes in each browser
Using the caps above, here is the effective cache time in seconds for common values. This is arithmetic from the code, not a browser measurement.
| You send | Chrome and Edge | Firefox | Safari |
|---|---|---|---|
| Nothing | 5 | 5 | 5 |
0 | not cached | not cached | not cached |
600 | 600 | 600 | 600 |
3600 | 3,600 | 3,600 | 600 |
7200 | 7,200 | 7,200 | 600 |
86400 | 7,200 | 86,400 | 600 |
604800 | 7,200 | 86,400 | 600 |
Any value above 7,200 buys you something only in Firefox, and any value above 600 buys nothing extra in Safari. If you want one number for all three, 7200 is the largest one that Chrome and Firefox both honor in full.
The cache is per URL, not per API
The CORS-preflight cache entry has a key (a network partition key), the request origin, the URL, the max-age, a credentials flag, and a method or header name. A later request matches only when the URL “equals request’s current URL”. Three consequences:
/orders/1and/orders/2each need their own preflight, even withAccess-Control-Max-Age: 7200. A query string makes a different URL too.- Because the key includes the network partition key, the same API called from pages on two different sites does not share entries.
- Browsers may drop entries early (the spec says so), and have limits of their own. Chromium does not store an entry when the URL is 1,024 characters or longer. Firefox’s source sets the cache to 100 entries.
Worked example: a dashboard that polls every 110 seconds
This is a hypothetical page, with the counts worked out by hand from the rules above. A dashboard posts JSON with an Authorization header to https://api.example.com/v1/events every 110 seconds for 8 hours: 262 requests, from t = 0 to t = 28,710 seconds. A new preflight is needed whenever the last entry for that URL has expired. How many OPTIONS requests does each setup send?
| Header sent on the OPTIONS response | Chrome and Edge | Firefox | Safari |
|---|---|---|---|
| None (5 s) | 262 | 262 | 262 |
600 | 44 | 44 | 44 |
7200 | 4 | 4 | 44 |
86400 | 4 | 1 | 44 |
The 262 requests become 524 round trips without the header, 306 with 600, and 266 with 7200 in Chrome. Now change the dashboard to call /v1/events/{id} for a different id each time. Every one of the 262 URLs is new, so each setup sends 262 preflights, whatever the header says. When the cost is the preflight count, fixing the URL design matters more than raising the number. Also check which of your headers force a preflight at all: only a short list of request headers is CORS-safelisted, so an Authorization header, or a custom header such as the Idempotency-Key described in how API idempotency prevents duplicate operations, makes a JSON POST preflighted.
Why you can still see a preflight on every call
- The header is on the wrong response. It is read from the OPTIONS response. Adding it only to the GET or POST response does nothing. The spec step stores the entry only after the CORS check passes and the preflight status is an ok status, so an OPTIONS handler that returns 401 or 404 caches nothing.
Authorizationis not covered by*. InAccess-Control-Allow-Headers, the spec treatsAuthorizationas a non-wildcard header name: it has to be listed by name. With credentials mode “include”,*is not a wildcard at all. A missing name makes the preflight fail, not cache. For where that header is validated afterwards, see JWT access token validation.- The request skips the cache. In Chromium’s preflight controller the cache lookup runs only when the request carries none of the cache-validate, bypass or disable load flags. I did not verify which DevTools settings or fetch cache modes set those flags, so test with “Disable cache” unticked before drawing conclusions from the Network panel.
- The value is not a plain integer.
7200sor2his not a valid delta-seconds value. See the table above for what each engine does with it.
Check what your server really sends
Send the same preflight the browser would, from a shell:
curl -si -X OPTIONS https://api.example.com/v1/events \
-H "Origin: https://app.example.com" \
-H "Access-Control-Request-Method: POST" \
-H "Access-Control-Request-Headers: authorization,content-type"
Look for a 2xx status, an Access-Control-Allow-Origin that matches the origin, an Access-Control-Allow-Headers that names authorization, and Access-Control-Max-Age: 7200. Then open the Network panel in Chrome with the method filter set to OPTIONS and count how many appear over a few minutes of normal use.
Remember the trade-off. Your CORS policy (allowed methods, headers, origins) is read again only when an entry expires, so a value of 7200 means a visitor who loaded the page before a policy change can run on the old answer for up to two hours in Chrome. Long caches suit a stable API. Use the 600 seconds all three engines accept in full if the policy is still moving.
Reporting & Sources
Read on December 1, 2026:
- Fetch Standard: CORS-preflight fetch, CORS-preflight cache and
Access-Control-Max-Age(living standard, last updated November 30, 2026) - MDN: Access-Control-Max-Age: the three browser caps and the pre-v76 Chromium cap
- Chromium: preflight_result.cc (5 s default, 2 h maximum, negative values), preflight_cache.cc (1,024-character URL limit) and preflight_controller.cc (cache lookup conditions)
- Firefox: nsCORSListenerProxy.cpp (86,400 s cap, 5 s default, 100 entries)
- WebKit: CrossOriginPreflightResultCache.cpp (600 s cap, 5 s default)
The source files describe the main branch on the date above; shipped browser versions can differ. The preflight counts in the dashboard example are arithmetic from these rules, not browser measurements.





