CDN not caching: Cache-Control private / no-cache / Set-Cookie on the response
The response tells shared caches not to store it, so the CDN passes every request to your origin.
Cache-Control private CDN not cachingCF-Cache-Status: BYPASSX-Cache: MISS from CDN every timeSet-Cookie prevents cachings-maxage not working Meaning
Cache-Control: private, no-store, no-cache, max-age=0 or a Set-Cookie header make CDNs bypass the cache (MISS/DYNAMIC/BYPASS). Send public, max-age=..., s-maxage for shared caches, and remove Set-Cookie from cacheable responses.
Common causes
Cache-Control: privateorno-storeSet-Cookieon static contentAuthorizationheader present- Framework default headers
- Cache rule not matching the path
⚡ Quick fix
- Send
Cache-Control: public, max-age=3600, s-maxage=86400 - Remove Set-Cookie from static responses
- Add an explicit CDN cache rule
Detailed fix by platform
Nginx
location /static/ { add_header Cache-Control "public, max-age=31536000, immutable"; }
How to diagnose
- Cache-Control — private/no-store?
- Set-Cookie — Present?
- CDN status — MISS/BYPASS?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026