4 min read

Edge Network Frequently Asked Questions (FAQ)

A list of frequently asked questions and answers related to the Vercel Edge Network.
Table of Contents

Static files are cached by all regions for up to 31 days. You can override this duration by setting a Cache-Control header in the headers property in a vercel.json file.

Dynamic responses (from Serverless Functions) are not cached unless they contain a Cache-Control header with specific directives (e.g. s-maxage).

You can read more about file caching in the cache documentation.

You can control how the Vercel Edge Network caches your responses by setting a Cache-Control header.

The transition is painless. All you have to do is configure DNS records to our DNS infrastructure.

You can create a new deployment to invalidate the cache for your Preview and Production Deployments. Content will remain cached for preview URLs until it expires.

You can read more about our caching limits in the caching documentation.

Using the vercel dev command through Vercel CLI will allow you to run your applications with additional Vercel Edge Network logic.

Using vercel dev is not necessary with Next.js applications — the Vercel Edge Network logic is already built-in with the next dev command.

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 stale-while-revalidate documentation.

s-maxage is the number of seconds a response is considered "fresh" by the Vercel Edge Network. After this period ends, the Vercel Edge Network 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.

Serverless Functions execute in the default region (iad1), unless you change this. Edge Functions execute in the region closest to your user, unless you specify a different region. You can see the functions's region by selecting the Functions tab and choosing the function from the drop-down.

To learn about the region your deployment is built in, you can view the build logs. See Builds to learn more about the build process.

Vercel mitigates against L3 and L4 DDoS attacks at the platform level. Usage will be incurred for requests that are successfully served prior to us automatically mitigating the event. Mitigation usually takes place within one minute.

Usage will be incurred for requests that are not recognized as a DDoS event, such as bot and crawler traffic.

You should monitor your usage and utilize Edge Middleware to protect against undesired traffic based on its IP, User-Agent header value, or other identifiers.

Yes, Vercel supports Image Optimization integrated into frameworks like Next.js and Nuxt with zero configuration.

You will need to use Origin Control: Off along with other custom caching rules in Cloudflare. You will also need to set s-maxage to 0 with the headers property in a vercel.json file to disable any caching from the Vercel Edge Network.

When you create a new deployment, you will have to find a way to purge Cloudflare's cache.

Last updated on June 15, 2024