aminkt / yii2-appcache
There is no license information available for the latest version (dev-master) of this package.
Yii2 appcache component to enable app cache in site.
dev-master
2018-12-13 23:48 UTC
Requires
- yiisoft/yii2: >=2.0.11
This package is auto-updated.
Last update: 2026-03-14 02:28:34 UTC
README
Add flowing line into your composer.json files.
"aminkt/yii2-appcache" : "@dev"
How use widget?
Add flowing lines into your controller class.
= public function behaviors() { return [ 'appcache' => [ 'class' => AppCacheFilter::className(), 'actions' => ['index', 'view'] ], ]; }
In action part of configuration add actions that you want create an manifest file for it.
Then add flowing line into your main.php of your layout.
<?php $appCache = \aminkt\components\appcache\AppCacheFilter::getManifestFileUrl($this); ?> <?php $this->beginPage() ?> <!DOCTYPE html> <html <?= $appCache ? "manifest=\"$appCache\"" : '' ?> >