mallka/yii2-flyingpage

Wrapper for flying page

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2020-11-24 15:46 UTC

This package is auto-updated.

Last update: 2024-05-24 23:40:04 UTC


README

Wrapper for flying-page .

ref:https://github.com/gijo-varghese/flying-pages

Install

Via Composer

php composer.phar require --prefer-dist yiirise/yii2-flyingpage "dev-master"

Add bellow line into your composer.json

"mallka/yii2-flyingpage": "dev-master"

and then exeute composer update

How to use:

<?= \mallka\flyingpage\FlyingPage::widget([
      'delay'=>0,//delay: Start prefetching after a delay (in seconds). Will be started when the browser becomes idle, using requestIdleCallback. Default to 0.
      'ignoreKeywords'=>['A','B'],  //ignoreKeywords: An array of keywords to ignore from prefetching. Example ['/logout','/cart','about.html','sample.png','#'].
      'maxRPS'=>3,//maxRPS: Maximum requests per second the queue should process. Set to 0 to process all requests immediately (without queue). Default to 3.
      'hoverDelay'=>50,//hoverDelay: Delay in prefetching links on mouse hover (in milliseconds). Default 50.
  ]); ?>