How can I prevent client-side data fetching and hide pageProps in Next.js, specifically for certain pages?

98 views Asked by At

I'm working with Next.js 12 and using Server-Side Rendering (SSR) to make data requests and pass that data to the main function via props. Everything works as expected when I navigate to the page for the first time. However, when I revisit the same page, I noticed that the pageProps are visible in the network tab. It appears that Next.js is using client-side rendering to fetch data when I revisit the page.

I've attempted to address this by experimenting with cache control, but I haven't found a solution yet.

Is there a way to prevent client-side fetching and avoid showing pageProps in the network tab for a specific page? If so, I'd appreciate any guidance or solutions you can provide.

0

There are 0 answers