Have you or anyone been able to get ISR working on Cloudflare Pages?
In all my tests, the page re-renders every time. I even tried setting Cache-Control headers, but it didn’t work.
Here’s the repo I’m using to test ISR on Cloudflare Pages:
Test route: /custom-endpoint-usage
🔗 https://github.com/ltroya-as/isr-demo/
Any hints or suggestions would be greatly appreciated. Thanks in advance!
GitHub
GitHub - ltroya-as/isr-demo
Contribute to ltroya-as/isr-demo development by creating an account on GitHub.
2 Replies
Hi @LTroya. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the knowledge sources do not explicitly confirm that Incremental Static Regeneration (ISR) works on Cloudflare Pages with Nuxt. The documentation does mention that ISR is supported on platforms like Netlify and Vercel, where the CDN cache can persist content until the next deploy or for a configurable TTL. However, Cloudflare Pages is not listed as a platform with explicit ISR support in the official Nuxt documentation for route rules and hybrid rendering. The docs do state that "whenever possible, route rules will be automatically applied to the deployment platform's native rules for optimal performances (Netlify and Vercel are currently supported)"—Cloudflare is not mentioned in this context, which suggests that ISR may not be natively supported on Cloudflare Pages at this time Hybrid Rendering.
Additionally, while Edge-Side Rendering (ESR) is supported on Cloudflare Pages, this is a different feature and does not guarantee ISR functionality Edge-Side Rendering.
If you are seeing pages re-render on every request despite setting route rules or cache headers, it is likely because Cloudflare Pages does not currently support ISR with Nuxt in the same way as Netlify or Vercel. There is no information in the provided sources about a workaround or successful implementation of ISR on Cloudflare Pages.
If you need ISR, you may want to consider deploying to Netlify or Vercel, where this feature is officially supported by Nuxt.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@234809194593648650> Kapa.ai is still learning and improving, please let me know how I did by reacting below.