Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
exclusions for individual js / css files (1 viewing) (1) Guest
Joomla Speedy Plugin will install the PHP Speedy Library and configure it through the Plugin's parameters.
Go to bottom Post Reply Favoured: 0
TOPIC: exclusions for individual js / css files
#649
zachariah (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
exclusions for individual js / css files 3 Years ago Karma: 0  
The original php_speedy has an option to exclude individual filenames from being processed (path doesn't matter just xyz.css or abc.js).

There are many templates out there that have js and css files that you might want to exclude from the compressing process, for instance files that are loaded conditionally using php (not browser conditions as php_speedy ignores files in those tags) or files in document.write tags.

It would be easy to include an extra parameter to add this feature just like white_list and blacklist (is just a comma delimited string).

In case you need this ability before it gets written into this fabulous plug-in, open up /plugins/system/bot_speedy.php
Around LINE 191 you'll find:

function _compress($body) {
		$body = $this->compressor->finish($body);
		return $body;
}
add the option $this->compressor->ignore above $body:
function _compress($body) {
		$this->compressor->ignore('abc.css,xyz.css,qwerty.js,ajax.js');
		$body = $this->compressor->finish($body);
		return $body;
}
of course replace the filenames with your own. voila, excluded files. -Zachariah
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.