I’m new to Next.js and facing some issues with page load times. I have pages using Server-Side Rendering (SSR), and when I click on these pages for the first time, it can take more than 5 seconds to load. However, if I navigate to the same page again, it loads in just 1 second, even from a different device. This leads me to believe it’s not related to the browser cache.
I’m using Vercel to host my frontend. I followed the advice to use the following configuration:
const nextConfig = { experimental: { esmExternals: false, }, };
I found this suggestion on this blog: Optimizing Next.js Cold Starts for Vercel, and it has slightly improved the situation. However, I still face significant delays on the first load.
What else can I do to further improve the performance of my SSR pages? Any advice or tips would be greatly appreciated.
Paul is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.