Relative Content

Tag Archive for next.jsserver-side-renderingvercel

How does Vercel middleware work for SSR appplication?

I have a server side rendering application (next.js) needs to be deployed to Vercel. And I’d like to deploy it to multiple regions. I understand that Vercel middleware is on edge and it can be used to forward the request to different url based on geolocation. I also set up a demo from this example:

How to Improve SSR Page Load Times in Next.js Hosted on Vercel?

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.