Attention: this kind of mod is intended for developer or Joomla site with high number of visitors and facing performances issues.
A small HOWTO, a more comprehensive documentation can be found in my WIKI. A new forum board has also been started for support, bugs and your comments.
The component com_minify like any Joomla component
so it look like:
And click on the bookmark tool "Create Minify URL's", a new tab or pop up will open:
In A, the tool will present You all JavaScript and CSS it has detected in the page, Remember this may change if you are a public or a registered user, this may also change if you remove or add module and plugin!
Now in that list, decide which JavaScript files can be combine (most of the time it is all, but you may want to create bundle of them if that is making sense), simply click on the blue link you want to add to the combine list.
Here for the example I select them all (also add securityimages.js):
Note:
Click now the [Update] button, the URL query Builder present you the text below that is self explanatory
Place this URI in your HTML to serve the files above combined, minified, compressed and with cache headers.
URI
/components/com_minify/b=Joomla1.5.8&f=media/system/js/mootools.js,media/system/js/caption.js,
components/com_securityimages/js/securityImages.js (opens in new window)HTML
<script type="text/javascript" src="/components/com_minify/b=Joomla1.5.8&f=media/system/js/mootools.js,
media/system/js/caption.js,components/com_securityimages/js/securityImages.js"></script>How to serve these files as a group
For the best performance you can serve these files as a pre-defined group with a URI like:
/components/com_minify/g=keyNameTo do this, add a line like this to /components/com_minify/groupsConfig.php:
return array( ... your existing groups here ...'keyName' => array('//Joomla1.5.8/media/system/js/mootools.js',
'//Joomla1.5.8/media/system/js/caption.js',
'//Joomla1.5.8/components/com_securityimages/js/securityImages.js'),
);Make sure to replace
keyNamewith a unique key for this group.
You did avoid 3 HTTP requests for including JavaScript, and only need one now!
Do the same for all CSS, here it is 6 CSS file for the default templates rhuk_milkyway
<link rel="stylesheet" href="/Joomla1.5.8/components/com_minify/index.php?g=css" />
You did avoid 6 HTTP requests for including JavaScript, and only need one now!
Open libraries\joomla\html\html\behavior.php and alter the class JHTMLBehavior
and comment lines like
JHTML::script('caption.js');
when you are sure that you did minify the script caption.js for both front end and back end.
My site use it NOW :-) but not for all js and css at the moment
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.