Preload / Prefetch Links on Mouse Hover

Hi there,

just found this small nugget in the Hotwire documentation:

Preload Links Into the Cache
" Preload links into Turbo Drive’s cache using <a href="/" data-turbo-preload>Home</a>.

This will make page transitions feel lightning fast by providing a preview of a page even before the first visit. Use it to preload the most important pages in your application. Avoid over usage, as it will lead to loading content that is not needed."

A long time ago, I stumpled upon a script for the old Turbolinks that loaded a links target into cache when the mouse hovered over the link for a certain amount of time (to load the soon to be clicked link in advance).


So I wondered: Is there anything similiar for Turbo-Drive available yet?

Here is a comment from DHH about this. So if anyone has an idea to pull this off, please open a pull request in the repo: