Test On-Demand ISR
This page is designed to test on-demand revalidation. Use the API endpoint to trigger an immediate revalidation.
Page Generated At
2026-04-30T01:38:56.416Z
Random Number (Changes on Revalidation)
3003
How to Test On-Demand Revalidation
- Note the current timestamp and random number above.
- Send a POST request to
/api/revalidatewith the path you want to revalidate and the secret token in thex-secret-tokenheader:
curl -X POST "https://your-domain.com/api/revalidate" \
-H "Content-Type: application/json" \
-H "x-secret-token: YOUR_SECRET_TOKEN" \
-d '{"path": "/test-isr"}'After revalidation, refresh this page to see the new timestamp and random number immediately — no need to wait for the 60-second interval!
Revalidation Configuration
- Time-based ISR:
revalidate = 60seconds - On-demand ISR: Via
/api/revalidateAPI route - Method:
revalidatePath()from Next.js Cache API - Auth: Header
x-secret-tokenmatchingSECRET_TOKENenv variable