Consider a Next.js page that uses getStaticProps with revalidate: 10. What is the behavior of this page after deployment?
export async function getStaticProps() { // fetch data return { props: { time: Date.now() }, revalidate: 10 }; } export default function Page({ time }) { return <div>Time: {time}</div>; }
Think about how Next.js updates static pages with ISR.
ISR allows Next.js to update static pages after deployment by regenerating them on the server at most once per the revalidate interval when a request comes in.
Choose the code snippet that correctly sets up ISR with a 60-second revalidation interval.
Check the type of the revalidate value.
The revalidate property must be a number representing seconds. Strings or booleans are invalid.
Given this ISR page that shows the current timestamp, what will a user see after the page regenerates?
export async function getStaticProps() { return { props: { timestamp: Date.now() }, revalidate: 5 }; } export default function TimestampPage({ timestamp }) { return <div>Timestamp: {timestamp}</div>; }
Remember ISR regenerates pages on the server, not on the client.
ISR updates the static page on the server after the revalidate interval. Users see the updated timestamp only after regeneration completes and the new static page is served.
This Next.js page uses ISR but never updates after deployment. What is the likely cause?
export async function getStaticProps() { const data = await fetch('https://api.example.com/data').then(res => res.json()); return { props: { data }, revalidate: 0 }; } export default function DataPage({ data }) { return <div>{data.message}</div>; }
Check the meaning of revalidate: 0 in Next.js ISR.
Setting revalidate to 0 disables ISR and makes the page behave like pure static generation, never regenerating after build.
Choose the best explanation of how Incremental Static Regeneration (ISR) benefits users compared to Server-Side Rendering (SSR).
Think about how ISR combines static and dynamic rendering benefits.
ISR pre-builds pages as static files for fast delivery and regenerates them in the background after a set time, reducing server work and improving speed compared to SSR which renders on every request.