Flying Page: made for wordpress, A better alternative for instant.page

0

Flying Pages preload pages before the user click on it, making them load correct now

Like a flash Links

Buy Me A Coffee

Utilization

Quickstart:

<script src="flying-pages.min.js">script>

With alternate choices:

<script>
  window.FPConfig = {
    lengthen: 0,
    ignoreKeywords: [],
    maxRPS: 3,
    hoverDelay: 50
  };
script>
<script defer src="flying-pages.min.js">script>
  • lengthen: Launch prefetching after a lengthen (in seconds). Will likely be began when the browser turns into indolent, the utilization of requestIdleCallback. Default to 0.
  • ignoreKeywords: An array of key phrases to push other than prefetching. Instance ['/logout','/cart','about.html','sample.png','#'].
  • maxRPS: Maximum requests per 2d the queue can need to peaceful job. House to 0 to job all requests correct now (without queue). Default to a couple.
  • hoverDelay: Prolong in prefetching hyperlinks on mouse flee (in milliseconds). Default 50.

The scheme in which it Works?

Flying Pages injects a diminutive JavaScript code (1KB gzipped), waits except the browser turns into indolent. Then it detects pages in the viewport and on mouse flee and preloads them.

Flying Pages is colorful to construct obvious preloading doesn’t fracture your server or construct it leisurely.

  • Preload pages in the viewport – Detect hyperlinks within the viewport (contemporary viewing space) the utilization of ‘Intersection Observer’ and tells the browser to preload them the utilization of ‘prefetch’, swap to xhr if no longer on hand (the same to Quicklink).

  • Preload pages on mouse flee – On hovering hyperlinks, if or no longer it is far never any longer preloaded but the utilization of above ‘viewport’, then Flying Pages will prefetch them correct now (the same to Instant internet page).

  • Limits the number of preloads per 2d – If your internet page has too many hyperlinks, prefetching all on the identical time will trigger the server to fracture or leisurely down the gain predicament to company. Flying Pages limits the number of preloads per 2d (3 req/sec by default) the utilization of an in-built queue. As an instance, whenever you happen to’ve gotten 10 hyperlinks in the viewport, preloading all these are span into 4 seconds.

  • Stops preloading if the server is busy – In case the server starts to retort slowly or return errors, preloading shall be stopped to diminish the server load.

  • Understands user’s connection and preferences – Tests if the user is on a leisurely connection esteem 2G or has enabled information-saver. Flying Pages could well well no longer preload anything in this case.

Read More

Leave A Reply

Your email address will not be published.