Next.js Discord

Discord Forum

If there a way to avoid subsequent requests on client only pages?

Unanswered
Alano Español posted this in #help-forum
Open in Discord
Alano EspañolOP
Made an discussion about that with more info https://github.com/vercel/next.js/discussions/80077

See:
- Pages dir: https://nextjs-pages-dir-single-request.vercel.app/example/1
- vs App dir: https://nextjs-app-dir-single-request.vercel.app/example/1

In pages dir, there isn't any request while navigating thought each page, since there isn't any data loading. On App dir, there is.

Is there a way to avoid subsequent navigation request? It's an annoying specially on small connections, on a page that loads all of the needed data on the layout itself.

I couldn't find anyone asking something similar, and it's really inconvenient that there doesn't seem to be a way to optimize that case 🤔

0 Replies