Incremental Static Regeneration (ISR) Gallery
This gallery demonstrates Next.js ISR. Pages are pre-rendered for speed (like static sites), but they automatically regenerate every 60s in the background whenever requests come in.
⚡ Fast Loads
Users always get a pre-rendered static page instantly.
♻️ Auto Updates
Content refreshes automatically without redeploys.
🔍 SEO Friendly
Search engines crawl fresh static HTML on every regeneration.
ISR Status
Page Revalidate:60 seconds
API Cache:30s / 45s
Generated At:09/04/2025, 06:03:28 UTC
Refresh this page multiple times within 60 seconds - you should see the same timestamp. After 60 seconds, the page will regenerate with a new timestamp on the next visit.
Picsum Photos Gallery
Random high-quality images fetched server-side (revalidates every 30s)
Testing ISR Behavior
How to Test:
- 1Note the "Generated At\" timestamp above
- 2Refresh the page multiple times quickly
- 3Timestamp should remain the same (served from cache)
- 4Wait 60+ seconds, then refresh
- 5New timestamp appears (page regenerated)
What You'll See:
- ✓Fast page loads (served from static cache)
- ✓Fresh content every 60 seconds
- ✓API data cached independently (30s/45s)
- ✓Zero loading time for cached content