- Cached before even visited!
- TurboLinks on steroids :-)
This simple plugin loads and caches pages when the user shows a mere intention to visit a link - she just moves the cursor over the link and the target page is cached immediatelly.
That results in a very quick navigating among pages, lower load, and better user experience.
Once cached switching between links is super quick, the HTTP request is performed only once.
HTML head elements are merged, scripts are executed.
Small (6 KB) and easy to use.
Best fit for server-side rendered websites.
https://ttulka.github.io/prelinks/index.html
npm install
npm run bundle
Put the script to the bottom of <body>
into each HTML page:
<script src="prelinks.min.js" id="prelinks" defer></script>
To disable prelinks on a particular link, add the attribute data-prelinks="false"
:
<a href="..." data-prelinks="false">...</a>
To disable caching for a particular link, add the attribute data-prelinks-cache="false"
:
<a href="..." data-prelinks-cache="false">...</a>
To enable an action for loading a page, put a meta tag prelinks-progress
into <head>
:
<meta name="prelinks-progress" content="blur">
Possible values for content
are:
none
(default)- no action
blur
- blur page
To disable caching completelly, put a meta tag prelinks-cache-control
with content="no-cache"
into <head>
:
<meta name="prelinks-cache-control" content="no-cache">