docs icon indicating copy to clipboard operation
docs copied to clipboard

Missing how to trigger revalidation with Vercel

Open rauluranga opened this issue 9 months ago • 0 comments

📚 Subject area/topic

ISR cache invalidation

📋 Page(s) affected (or suggested, for new content)

https://docs.astro.build/en/guides/integrations-guide/vercel/#isr

📋 Description of content that is out-of-date or incorrect

The ISR cache invalidation docs are missing an essential part to make it work, the final piece is to make a call with the appropriate request headers, it should include at the end of the docs something like the following:

Now, you can trigger revalidation by sending a GET or HEAD request to the page's URL with the x-prerender-revalidate header:

curl -H "x-prerender-revalidate: <YOUR_BYPASS_TOKEN>" https://your-site.com/posts/my-article-slug

This will tell Vercel to revalidate the /posts/my-article-slug page, ensuring the next visitor sees the fresh content. You can trigger this request from a webhook in your CMS or any other part of your application.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

rauluranga avatar Jan 28 '25 01:01 rauluranga