This post provides a guide on how to configure CDN caching for self-hosted Next.js websites. It covers examples from common CDN options like Cloudflare, Fastly, and Amazon CloudFront. The post also discusses the default cache headers in Next.js and provides solutions for caching different types of Next.js pages.

12m read timeFrom focusreactive.com
Post cover image
Table of contents
Setting the context ​Beware of weak caching defaults for assets in the public folder ​Configuring Cloudflare CDN for the Next.js app ​Configuring Fastly CDN for the Next.js app ​Stale while revalidate ​Caching for different Next.js page types and data-fetching strategies ​Demos ​Some other things to note with self-host CDN ​
2 Comments

Sort: