Download the PHP package roliod/codeigniter-asset-versioning without Composer
On this page you can find all versions of the php package roliod/codeigniter-asset-versioning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download roliod/codeigniter-asset-versioning
More information about roliod/codeigniter-asset-versioning
Files in roliod/codeigniter-asset-versioning
Package codeigniter-asset-versioning
Short Description This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique.
License MIT
Informations about the package codeigniter-asset-versioning
codeigniter-asset-versioning
This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique. The version number used is the assets last modified timestamp.
Installation
Installing Composer..
You are not obliged to move the composer.phar
file to your /usr/local/bin
, it is however considered easy to have an global installation.
Add the following to your require block in composer.json
config
If your new to composer and have no clue what I'm talking about
Just create a file named composer.json
in your document root:
Now let's install the package:
You can also install by using:
Lastly, run this command when the package has been successfully installed:
That's all !
Installation (Manual)
- copy src/helpers/asset_helper.php to application/config
- copy src/libraries/asset.php to application/libraries
Configuration (Autoload)
The autoload file is located at application/config/
- add 'asset' to libraries
- add 'asset' to helpers
$autoload['libraries'] = array('asset');
$autoload['helpers'] = array('asset');
Configuration (Config)
The config file is located at application/config/
- add a 'base_url' config
$config['base_url'] = 'https://mywebsite.com'
Usage
- CSS:
<link href="" rel="stylesheet" type="text/css" />
- JS:
<script src="" type="text/javascript"></script>