extendedclientscript Faster page loading by combining and compressing JS / CSS files

  1. Documentation
  2. Change Log

With this extension you can transparently reduce page load times by combining and compressing the used Javascript and CSS files.

All parameters can be set in your main.php config. No need for altering your code, just set and forget.

Needs Yii 1.0.4/1.1.x or greater, and for compression JSMin and CSSTidy.

Resources

Documentation

Requirements
  • Yii 1.0.4/1.1.x or above
Installation

Since version 0.9

  • Extract the zip file under 'proctected/extensions'
  • Add the following to your 'config/main.php':
// application components
	'components'=>array(
                 ....
	    'clientScript'=>array(
			'class'=>'ext.ExtendedClientScript.ExtendedClientScript',
			'combineCss'=>true,
			'compressCss'=>true,
			'combineJs'=>true,
			'compressJs'=>true,
		),

And you're set!

For more options see the comments in the file. To mention a few:

  • excludeFiles: array with files not to be combined/compressed. Handy for some rarely used JS/CSS files.
  • autoRefresh: If false, no check on filemtime() to speed up a bit more. Useful in production.

Change Log

August 30, 2011: 0.9.0
  • New version, using CssMin and JsMin (included). Several improvements of Sam included.
    August 23, 2011: 0.4.1
  • Automatic exclusion of remote files (JS as well as CSS), so you can use your CDN of choice. Thanks Kir!
  • By popular demand: removal of DIRECTORY_SEPARATOR, changed to '/'
    March 12, 2009
  • Additional test to prevent E_ALL errors.
    March 11, 2009
  • Initial release.
18 5
29 followers
4 210 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Caching
Developed by: Maxximus
Created on: Mar 11, 2009
Last updated: 13 years ago

Downloads

show all

Related Extensions