Preloads a GET
link.
When the link is clicked later, the response will already be cached, making the interaction feel instant.
You may use this function to programmatically populate the cache with pages the user is likely to click or requires accessible while offline.
Render options to apply when preloading this link.
Most options for up.follow()
can be used,
but no elements will be changed while preloading.
An object with additional request headers.
Unpoly will by default send a number of custom request headers.
E.g. the X-Up-Target
header includes the targeted CSS selector.
See up.protocol
for details.
Whether the request may be aborted by other requests targeting the same fragments or layer.
Whether this request will load in the background.
Background requests deprioritized over foreground requests.
Background requests also won't emit up:network:late
events and won't trigger
the progress bar.
A promise that will be fulfilled when the request was loaded and cached.
When the link cannot be preloaded, the promise rejects with an error.