gridsome / gridsome

⚡️ The Jamstack framework for Vue.js
https://gridsome.org
MIT License
8.55k stars 490 forks source link

How disable Pre-fetch pages ? #786

Open LudovicEvrard opened 5 years ago

LudovicEvrard commented 5 years ago

Hello,

I've made many test with gridsome and I love it! I'm looking for a tool for made static website and I'm looking how disabling pre fetch pages with JavaScript and json.

I don't see any option for made that. It will be nice if we have an option to choose between speed loading and reducing page weight and number of loaded JS.

Thanks for your help.

hjvedvik commented 5 years ago

The plan is to have an SSR/generator API with options for prefetching etc. It's not ready yet, but we accepted a temporary solution in #716 that you could try out in v0.7.9.

LudovicEvrard commented 5 years ago

Hello, Thanks to reply. I've already inserted this code in gridsome.config.js

prefetch: { mask: '^$', // example - disable all prefetch },

But it is not exactly same things. It is not imported inside my page. But I want to disable all pages prefetch. But if it's planned don't worry, it's cool. I'm testing a global solution and I have time left for find right solution.

Thank you,

awulkan commented 4 years ago

I am also interested in this, as there appears to be a lot of network requests happening unnecessarily. Or maybe it could be made "smarter" by only prefetch content that the user is close to or hovering with the mouse pointer.

iamarpitpatidar commented 3 years ago

@dominiquedutra any update on the enhancement bud ?

dubem-design commented 2 years ago

I need this