swup / preload-plugin

A swup plugin for preloading pages to speed up navigation 🚀

Home Page:https://swup.js.org/plugins/preload-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] How to activate hover only preload

omar391 opened this issue · comments

commented

Describe your issue:
Sometimes it's not necessary to preload or even not optimal (on mobile data), to preload all the annotated links.

So it possible to activate the hover-only link preload?

Not currently. You could disable and enable the plugin itself, but that'd also disable hover preloading. I do like the idea of considering network conditions, but I remember it being somewhat difficult to find out what network type the user is on. Feel free to create a PR if you can think of an elegant solution :)

I'll close this for now as we're currently not planning on creating separate options for the different preload types. Happy to accept a PR, though.