cakephp/cakephp — pull request #3037 by andreasdr (2014-03-17 08:27:02+00:00)
Title: 2.5

It should be possible to force the browser to fetch new css versions, this can perfectly be done by an parameter "version" with its version number as value.

Example in a theme's default.ctp:

```php
Html->css(array('theme'), array('version' => '2'));
?>
```

Patch:
```patch
--- ../rogue-assembly-webstack/CakePHP-2.5/HtmlHelper.php	2014-03-17 09:13:57.000000000 +0100
+++ lib/Cake/View/Helper/HtmlHelper.php	2014-03-17 09:09:21.000000000 +0100
@@ -401,6 +401,7 @@
* - `plugin` False value will prevent parsing path as a plugin
* - `rel` Defaults to 'stylesheet'. If equal to 'import' the stylesheet will be imported.
* - `fullBase` If true the URL will get a full address for the css file.
+ * - `version` set up a CSS version to prevent the browser to use its internal cache if a css has changed
*
* @param string|array $path The name of a CSS style sheet or an array containing names of
* CSS stylesheets. If `$path` is prefixed with '/', the path will be relative to the webroot
@@ -460,6 +461,7 @@
'@import url(' . $url . ');'
);
} else {
+	if (isset($options['version'])) $url.= '?version=' . $options['version'];
$out = sprintf(
$this->_tags['css'],
$options['rel'],
```
Thank you!