Static files are cached by all regions for 31 days. You can override this duration by setting a
Cache-Control header via the headers property in a
Dynamic responses (from Serverless Functions) are not cached unless they contain a
Cache-Control header with specific directives (e.g.
You can read more about this in the caching documentation.
You can control how the CDN caches your responses by setting a
The transition is painless. All you have to do is configure DNS records to our DNS infrastructure.
You can read more about our CDN's caching limits in the caching documentation.
The first request is served synchronously. Subsequent requests are served from the cache and revalidated asynchronously if the cache is "stale".
You can read more about this in the
s-maxage is the number of seconds a response is considered "fresh" by the CDN. After this period ends, the CDN will serve the "stale" response from the edge until the response is asynchronously revalidated with a "fresh" response to your Serverless Function.
We strip the
stale-while-revalidate directive from your
Cache-Control so browsers do not get it. This will allow you to deliver the latest content to your visitors right after creating a new deployment (as opposed to waiting for browser cache to expire).
You can find the full list of our regions in the regions documentation.
Users who visit your deployments will automatically use the region that is geographically closest to them.
You will not get charged for CDN traffic in a DDoS event. There are measures in place to detect and mitigate bad actors in a DDoS event.
We currently do not have an image optimization service in place. Let us know if you would like to see this feature.
You will need to use
Origin Control: Off along with other custom caching rules in Cloudflare. You will also need to set
0 with the headers property in a
vercel.json file to disable any caching from our CDN.
When you create a new deployment, you will have to find a way to purge Cloudflare's cache.