Fast Page Loading with Next.js ISR

Improve EC site performance with static generation and automatic updates

ISRNext.jsStatic GenerationPerformance
2 min read

About This Project

ISR (Incremental Static Regeneration) is a Next.js feature that generates static pages while automatically updating them at set intervals.

For EC sites, it's essential to display up-to-date product information while maintaining fast load times. With ISR, you can achieve both fast delivery from cache and fresh data.

Learn More

Three articles explain ISR in detail.

Architecture

Traditional SSR (Server-Side Rendering)
User Request
Every page load
Server Processing
API call + HTML generation
Display
Wait time on every request
ISR - At Build Time
Fetch Data
Call Shopify API
Generate HTML
Create static pages
Deploy to CDN
Ready for fast delivery
ISR - On User Access
User Request
Visit product page
CDN
Serve cached page instantly
Background Update
After revalidate time, regenerate
Fast Display
Users never wait
On-Demand ISR - Product Update
Webhook
Product updated in Shopify
API Route
Receive webhook notification
Invalidate Cache
Clear old cached page
Fresh Data
Next visitor sees updated content

Technologies Used

  • Next.js (App Router)
  • Vercel (Hosting & Edge Network)
  • Shopify Storefront API
  • Shopify Webhook

Related Topics