Extends CClientScript to include a timestamp in references (url) to local files.
This timestamp will avoid issues that arise when server files are updated while the navigator's cache still serves the old files.
The client cache will still work, but will be update due to timestamp that changes the URL.
In other words, when you update a js,css,png, ... file that is in a theme directory for instance, the end user will get the update regardless of the state of his local cache, and less dependent on the caching scheme of your hosting provider.
To use this extension, put the class file where you think it is appropriate, but found by Yii, and then update your configuration:
return array( [...] 'components'=>array( [...] 'clientScript' => array( 'class'=>'TimestampClientScript', ), [...] ) [...] );
If you already use other CClientScript replacements, modify TimestampClientScript to extend from your other CClientScript replacement.
This extension determines the local path for the Url and if the local path exists, it will add a time stamp.
So your HTML will contain references to local css and js files like this:
<link rel="stylesheet" type="text/css" href="/themes/mytheme/css/main.css?1406793094">