Next.js · Senior · Question 20 of 75

How do you implement on-demand ISR via a CMS webhook?

Explanation

The CMS sends a POST to /api/revalidate with a secret and the ID of the changed entry; the handler verifies the signature and invalidates the relevant tags. Pages update on the next request, without a full rebuild. router.refresh() is a client-side API.

Further reading

Problem with a question

Next.js · Senior · question 20

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz