PHPackages                             roliod/codeigniter-asset-versioning - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. roliod/codeigniter-asset-versioning

ActiveLibrary

roliod/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.

1.0.1(7y ago)191MITPHPPHP &gt;=5.4.0

Since Jun 2Pushed 7y ago1 watchersCompare

[ Source](https://github.com/roliod/codeigniter-asset-versioning)[ Packagist](https://packagist.org/packages/roliod/codeigniter-asset-versioning)[ RSS](/packages/roliod-codeigniter-asset-versioning/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (3)Used By (0)

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
------------

[](#installation)

Installing Composer..

```
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/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

```
"roliod/codeigniter-asset-versioning": "^1.0"
```

**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:

```
{
    "require": {
        "roliod/codeigniter-asset-versioning": "^1.0"
    }
}
```

Now let's install the package:

```
composer install

```

You can also install by using:

```
composer require roliod/codeigniter-asset-versioning

```

Lastly, run this command when the package has been successfully installed:

```
php vendor/roliod/codeigniter-asset-versioning/install.php

```

That's all !

Installation (Manual)
---------------------

[](#installation-manual)

- copy src/helpers/asset\_helper.php to application/config
- copy src/libraries/asset.php to application/libraries

Configuration (Autoload)
------------------------

[](#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)
----------------------

[](#configuration-config)

The config file is located at application/config/

- add a 'base\_url' config

`$config['base_url'] = 'https://mywebsite.com'`

Usage
-----

[](#usage)

- CSS: `
