I'm using nextJS for my new website, but SEO and speed of the site is of very importance matter for me. What I'm trying to do is prevent loading of extra resource files while I have no need for them. For example when I'm at the Home page, I do not need resources for faq or about page be loaded in the background. Is there anyway I can possibly prevent these extra loads on my site?
Thank you in advance

afaik, next.js is prefetching js bundles for the pages linked from the given one. To disable prefetching you can use Link with prefetch={false}:
<Link href="/faq" prefetch={false}>
<a>FAQ</a>
</Link>
More on this in the docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With