prefetchit
v0.2.1
Published
A naive prefetch for the browser
Readme
prefetchit
A naive prefetch for the browser.
Install
Usage
prefetchit will add a <link rel="prefetch" href="asset.ext" /> to the current document head for each resource passed, filtering for duplications.
add(asset: string): void
import prefetch from 'prefetchit';
prefetch.add('./my-res.png');
prefetch.add('./my-other-res.png');bulk(...asset: string): void
import prefetch from 'prefetchit';
prefetch.bulk('./my-res.png', './my-other-res.png');