<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tuha'a Ziyaad</title>
    <description>The latest articles on DEV Community by Tuha'a Ziyaad (@tuhaaziyaad).</description>
    <link>https://dev.to/tuhaaziyaad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3287448%2Fb1c21391-39e7-4417-9a06-c055e5d1769a.png</url>
      <title>DEV Community: Tuha'a Ziyaad</title>
      <link>https://dev.to/tuhaaziyaad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tuhaaziyaad"/>
    <language>en</language>
    <item>
      <title>Improving Next.js Performance: SSR to SSG + ISR for Faster Load Times</title>
      <dc:creator>Tuha'a Ziyaad</dc:creator>
      <pubDate>Mon, 23 Jun 2025 12:44:28 +0000</pubDate>
      <link>https://dev.to/tuhaaziyaad/improving-nextjs-performance-ssr-to-ssg-isr-for-faster-load-times-5gp8</link>
      <guid>https://dev.to/tuhaaziyaad/improving-nextjs-performance-ssr-to-ssg-isr-for-faster-load-times-5gp8</guid>
      <description>&lt;p&gt;Page speed matters more than ever. Google’s &lt;a href="https://web.dev/vitals/" rel="noopener noreferrer"&gt;Core Web Vitals&lt;/a&gt; framework has made &lt;a href="https://web.dev/ttfb/" rel="noopener noreferrer"&gt;TTFB&lt;/a&gt; and &lt;a href="https://web.dev/fcp/" rel="noopener noreferrer"&gt;FCP&lt;/a&gt; crucial for ranking well. After hitting limitations with &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props" rel="noopener noreferrer"&gt;SSR&lt;/a&gt;, we decided to move to &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration" rel="noopener noreferrer"&gt;SSG + ISR&lt;/a&gt; on two of our most active content sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nolcardbalanceae.com/" rel="noopener noreferrer"&gt;nolcardbalanceae.com&lt;/a&gt; — public transport and NOL card balance check guides&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wgustudentsportal.com/" rel="noopener noreferrer"&gt;wgustudentsportal.com&lt;/a&gt; — student tools and academic resources&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SSR Was Slowing Us Down
&lt;/h2&gt;

&lt;p&gt;Both platforms initially used &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props" rel="noopener noreferrer"&gt;getServerSideProps&lt;/a&gt;, but with traffic rising and SEO slipping, performance audits with &lt;a href="https://pagespeed.web.dev/" rel="noopener noreferrer"&gt;PageSpeed Insights&lt;/a&gt; and &lt;a href="https://developers.google.com/web/tools/lighthouse" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt; confirmed what we feared: server response time was hurting the experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Static + Dynamic? Use ISR
&lt;/h2&gt;

&lt;p&gt;We migrated to &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props" rel="noopener noreferrer"&gt;getStaticProps&lt;/a&gt; with &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/incremental-static-regeneration" rel="noopener noreferrer"&gt;Incremental Static Regeneration (ISR)&lt;/a&gt;, letting us statically generate thousands of guides and tools for both nolcardbalanceae.com and wgustudentsportal.com.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;return {&lt;br&gt;
  props: { data },&lt;br&gt;
  revalidate: 7200, // Every 2 hours&lt;br&gt;
};&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The result? Pages served instantly, with fresh data reloading in the background.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the Vercel Build Limit
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://vercel.com/docs/limits/overview#build-limits" rel="noopener noreferrer"&gt;Vercel’s 45-minute build limit&lt;/a&gt; created a blocker during deployment. With so many static pages, we exceeded the threshold regularly.&lt;/p&gt;

&lt;p&gt;To fix it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We batched content at build time&lt;/li&gt;
&lt;li&gt;Stored it as local JSON&lt;/li&gt;
&lt;li&gt;Called that in getStaticProps()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This brought total build time below 30 minutes and gave us predictable, fast deployments.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Improved
&lt;/h2&gt;

&lt;p&gt;After implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nolcardbalanceae.com" rel="noopener noreferrer"&gt;nolcardbalanceae.com&lt;/a&gt; saw bounce rate drop by 20%&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://wgustudentsportal.com/" rel="noopener noreferrer"&gt;wgustudentsportal.com&lt;/a&gt; pages loaded under 1 second&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developers.google.com/web/tools/lighthouse" rel="noopener noreferrer"&gt;Lighthouse scores&lt;/a&gt; consistently hit 95+&lt;/li&gt;
&lt;li&gt;Googlebot crawled 3× more URLs per day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We followed &lt;a href="https://nextjs.org/docs/pages/building-your-application/data-fetching/overview" rel="noopener noreferrer"&gt;Next.js best practices&lt;/a&gt; and &lt;a href="https://web.dev/performance-scoring/" rel="noopener noreferrer"&gt;Google’s performance guidelines&lt;/a&gt; to the letter — and it paid off.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
