GoogleChromeLabs / quicklink

⚡️Faster subsequent page-loads by prefetching in-viewport links during idle time
https://getquick.link
Apache License 2.0
11.02k stars 403 forks source link

Option to use prerender where available? #191

Open devongovett opened 4 years ago

devongovett commented 4 years ago

Thanks for this awesome project! I noticed that it only downloads the HTML for the next page, which certainly helps, but it doesn't prefetch any sub-resources (e.g. scripts/styles on the next page). Might be cool to add an option to use <link rel="prerender"> where available (Chrome, IE, Edge) to support this with fallback to standard prefetch where not (Firefox, Safari)?

What do you think?

git-webmaster commented 4 years ago

Came here to ask the same. Maybe it will be useful to provide an option, what <link rel='%choice%'> user prefer to implement? Was thinking about preload\prerender.

addyosmani commented 3 years ago

Hey @devongovett! Thanks for the feedback! I've considered adding support for rel=prerender in the past and it may be possible developers would get enough benefit from the current implementation of NoStatePrefetch for this to be a worthwhile addition.

I would be interested to hear if others would also find this functionality worthwhile.

pereorga commented 1 year ago

As far as I can see, the modern, non-deprecated approach of prerending pages would be using Speculation Rules, as explained in https://developer.chrome.com/blog/prerender-pages/#the-speculation-rules-api.

But I think adding this in a generic tool such as quicklink would be a terrible idea, considering that this tool processes all links that are visible.