gijo-varghese / flying-pages

Load inner pages instantly, intelligently
ISC License
213 stars 20 forks source link
performance prefetch preload speed web-performance

Flying Pages

Flying Pages prefetch pages before the user click on links, making them load instantly

Quick Links

Buy Me A Coffee

Usage

Quickstart:

<script src="https://github.com/gijo-varghese/flying-pages/raw/master/flying-pages.min.js"></script>

With options:

<script>
  window.FPConfig = {
    delay: 0,
    ignoreKeywords: [],
    maxRPS: 3,
    hoverDelay: 50,
  };
</script>
<script defer src="https://github.com/gijo-varghese/flying-pages/raw/master/flying-pages.min.js"></script>

How it Works?

Flying Pages injects a tiny JavaScript code (1KB gzipped), waits until the browser becomes idle. Then it detects pages in the viewport and on mouse hover and prefetch them.

Flying Pages is intelligent to make sure prefetching doesn't crash your server or make it slow.