Joomla tags

a real free joomla tag system

  • Increase font size
  • Default font size
  • Decrease font size
Tag:compress

Some tips and frequently asked questions on Joomla plugin CssJsCompress.

  • Why the plugin doesn't work after I turn on "GZIP CSS and JS"?

    Before enable "GZIP" compress, please make sure:
    Apache has installed zlib.

  • How do I know apache have installed zlib?

    On administrator control panel, Help-->System Info-->PHP Information. (or open the following url:/administrator/index.php?option=com_admin&task=sysinfo).
    If php has enable zlib, you should find zlib block.

  • Do "Optimize CSS files" and "Optimize JavaScript files" need zlib?

    No. Only you have set "GZip Javascript and Css" to "yes", you need Zlib.

  • If "Optimize CSS files" doesn't work on my site, can I only turn on "Optimize JavaScript files"?

    Yes, you can only turn on css or js optimize. At the same time, you can turn on "Optimize JavaScript files" and "GZip Javascript and Css",
    so long as you have installed zlib

  • If you include "includes/js/joomla.javascript.js" file, the plugin can't load javascript correctly.

    Please remove the first line:

    // 
  • How to use "Exclude Components" ?

    After enable CssJsCompress, all site works fine except some component.
    For example, after enable CssJsCompress, only Virtuemart doesn't work fine, thus you can add "com_virtuemart" to "Exclude Components".

  • How to use "Exclude CSS Files"?

    After you enable the CssJsCompress plugin, some module don't show correctly, then you can try to add the module introduced CSS Files to "Exclude CSS Files".

  • How to use "Exclude JavaScript Files"?

    After you enable the CssJsCompress plugin, some module JavaScripts don't work correctly, then you can try to add the module introduced JavaScripts to "Exclude JavaScript Files".

  • How to solve jquery and mootools both exist problem?

    Please fill in Custom JavaScript Order in the following orders: jquery file,jquery plugins, and all files build in jquery, mootools files. For example:

    jquery.js,easySlider1.7.js,mootools-uncompressed.js
    Please remember to change the jquery and jquery plugin to your own site's file. You also need to JQuery No Conflict to no.

     

  • How to use "JQuery File Name"?

    JQuery have conflict with Mootools. When your site have both JQuery and Mootools libraries, you need tell the plugin "JQuery File Name", so that CssJsCompress can do some special handle. Your site's JQuery library may have a name of jquery.js, jquery.min.js, jquery1.2.6.js or any other names, please input exactly the same name with your site.

  • How to use "JavaScript Custom Order"?

    JavaScript files may depend on other JavaScript Files. For example, some JavaScript files may depend on mootools and jquery, so these files should appear after mootools or jquery. Perhaps you can refer How to solve jquery and mootools both exist problem?

 

Joomla Plugin CssJsCompress can automatically optimize external resources like CSS
and JavaScript,   which can reduce both the size and number of requests made to your website.

  CSS files can be aggregated and compressed into a single file,
   while JavaScript files are only aggregated (but not compressed).
  These optimizations may reduce server load, bandwidth requirements, and page loading times.

According to Best Practices for Speeding Up Your Web Site , to build a high performance web site, here are the most important  best practices:

  1.  Minimize HTTP Requests
  2. Add an Expires or a Cache-Control Header
  3. Gzip Components

Joomla Plugin CssJsCompress can help you achieve the above practice easily.

 

 

After aggregation of css and js

 

 After compression:

 

 


 CSS File NumberCss FileSizeJs File NumberJs File SizeTotal Http Requests
Before Aggregation1060.5K797K35
After Aggregation162.7K197K20
After GZip 18.7K126.8K20


From the above data, we know

  1. Css and javascript aggregation can decrease the http requests dramatically for those sites built with a lot of modules(Usually a lot of css and javascript files.) 
  2. GZip can compress css and javascript files a lot. The plugin only need to compress the css and javascript files once, so this can save a lot of CPU times, and give a repeat response.
Tips:
  1. Put plugin CssJsCompress just before System plugin Cache, so that it can include all other plugin's result and be cachable.
 
Powered by Tags for Joomla