-
Notifications
You must be signed in to change notification settings - Fork 412
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
Continue prefetching as the user scrolls #6
Comments
Thanks for the suggestion. I have this working in a local branch now: The one thing I need to play around with is whether we'll need to add a level of debouncing + usage of Intersection Observer thresholds to limit how often we're firing refiring prefetching. The internal prefetch.mjs maintains its own in-memory log of what was previously fetched so its less a concern of making repeated network requests for URLs and more just avoiding overhead (though I haven't yet had a chance to measure this properly). I'll clean this up and get it pushed to the repo soon. |
@jadjoubran Do you have a preference on whether this behavior is the default vs an option? |
oh looks great!
Good point, maybe enable it by default but allow an option to disable it. Maybe it makes sense to disable it for websites where most of the navigation happens above the fold |
After thinking about this a little further, I think it's fair game to prefetch in-viewport links as the user scrolls. We an address an option for controlling this if folks ask for it :) |
Does it make sense to prefetch links as the user is scrolling?
Here's a screencast of an example where I'm reading a JavaScript usecase and when I scroll towards the end, it would be nice for quicklink to prefetch those 2 related usecases
Screencast link: https://photos.app.goo.gl/mHgwbTmoKYXmXudEA
The text was updated successfully, but these errors were encountered: