2017 © Pedro Peláez
 

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

image

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.

  • Sunday, June 3, 2018
  • by roliod
  • Repository
  • 1 Watchers
  • 0 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

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., (*1)

Installation

Installing Composer.., (*2)

$ 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., (*3)

Add the following to your require block in composer.json config, (*4)

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

If your new to composer and have no clue what I'm talking about, (*5)

Just create a file named composer.json in your document root:, (*6)

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

Now let's install the package:, (*7)

composer install

You can also install by using:, (*8)

composer require roliod/codeigniter-asset-versioning

Lastly, run this command when the package has been successfully installed:, (*9)

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

That's all !, (*10)

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/, (*11)

  • add 'asset' to libraries
  • add 'asset' to helpers

$autoload['libraries'] = array('asset');, (*12)

$autoload['helpers'] = array('asset');, (*13)

Configuration (Config)

The config file is located at application/config/, (*14)

  • add a 'base_url' config

$config['base_url'] = 'https://mywebsite.com', (*15)

Usage

  • CSS: <link href="<?php echo version_url('path/to/css/file') ?>" rel="stylesheet" type="text/css" />
  • JS: <script src="<?php echo version_url('path/to/js/file') ?>" type="text/javascript"></script>

The Versions

03/06 2018

dev-master

9999999-dev

This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Roland Oduberu

assets codeigniter asset-versioning

03/06 2018

1.0.1

1.0.1.0

This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Roland Oduberu

assets codeigniter asset-versioning

02/06 2018

1.0.0

1.0.0.0

This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Roland Oduberu

assets codeigniter asset-versioning