instantpage / instant.page

Make your site’s pages instant in 1 minute and improve your conversion rate by 1%
https://instant.page
MIT License
6.01k stars 206 forks source link

Prefetch with fetchPriority=high on hover/touchstart #117

Closed dieulot closed 1 year ago

dieulot commented 1 year ago

By default, a prefetch is loaded with a low priority. When there’s a fair chance that this prefetch is going to be used in the near term (= after the small delay on hover, or on touchstart), giving it a high priority would help make the page load faster in case there are other resources loading.

Prioritizing it implicitly means deprioritizing every other resource that’s loading on the page. Due to HTML documents usually being much smaller than other resources (notably images and JavaScript), this theft of bandwidth should rarely be detrimental.