Purpose
Preload links when they come into view, or the user hovers over them.
| Value | Type | Description | Default |
|---|
mode | String | Which mode to use for prefetching links. intersect - When the link comes into the viewport. mouseover - When the user hovers over the link | mouseover |
Events
| Event | When | Dispatched on | event.detail |
|---|
- | - | - | - |
Side Effects
None
How to Use
The controller will preload links by injecting a <link rel="prefetch" as="document" href="..."> element into the document <head>.
It will only do so if there is not already a prefetch link with the same href already in the <head>.