-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefetch page content via Ajax on link hover #6241
Comments
Hey 👋 Executing these functions beforehand might lead to inconsistencies of the app state (especially when the content in the store will change before the page is even visible). I agree, the docs need a chapter about the current behavior. More info in #4574 |
Thanks for the links @manniL. So there are 2 threads here:
Thanks.. |
Yes but only if the connection is good (better than 2G) and no data saver is enabled. Also, the browser has to support IntersectionObserver.
What could we do to improve the docs in your opinion? re 2: We can keep it open, sure. |
@manniL |
Coming from Gatsby, I decided to make a project in Nuxt, and was suprised to see all the components pre-fetched! I like the concept of only prefetching on hover and it would be a nice feature to have in Nuxt! |
At the moment, prefetching works via intersection observer (when a |
This would be a cool feature! |
Any update about the progress here? |
This is still a nice feature to have in 2022 |
What problem does this feature solve?
Instantclick (http://instantclick.io) is a nifty little js library (< 3kb gzipped) that pre-fetches pages via Ajax when you hover on links, based on the user's intent to click on it. A great example of a site that does that is dev.to (example: go to https://dev.to/t/vue, open up the console and notice the ajax requests when you hover on any link)
Does Nuxt support this natively? I see some mentions of "prefetching" in the API documentation but I don't see it happening on my nuxt instance (I am on nuxt-edge). Is this functionality available in Nuxt?
https://nuxtjs.org/api/configuration-router#prefetchlinks
Is it off by default, perhaps? If it's not available, this would be a really nifty thing to add to the core library, perhaps as a configuration option.
It would also be helpful to get more information on what "prefetch" in the API documentation is referring to, and how one can see it in action.
The text was updated successfully, but these errors were encountered: