|
JS/CSS compression removes the whitespace and combines all the files into one single file. One file for JS and a different file for CSS. By reducing the number of files transfered and the file size you web pages are able to display faster.
It can be tricky to get the files compress and have all of the functionality work correctly. Several extension are available some work very well and are not so great.
It should also be noted that CSS and JS Optimization work independently of each other. Meaning you can enable CSS optimization while leaving the JS files unmodified. It has been our experience that the JS optizmization has been a little more difficult than the CSS optimization.
JS/CSS Compression Options
JReviews
There is a Cache tab in the configuration options that controls the
optimization of the JS/CSS files. Both work very well It should be
noted that this will only Combine and compress the JReviews JS/CSS
files. Depending on the Joomla extensions used a sitewide solution maybe a better
approach.
As of build 142 there was a bug and the files are being compressed but not cached
Cache Accelerate
This extension does much more than just compression but does include compression for both CSS and JS files.
Works very well and very flexible. Has a great feature where you can
disallow specific CSS or JS files from being combined into one single file. This is very handy for advanced scripts that break when
they are compressed.
I had to dissallow the jreviews.js script to get JReviews to correctly work when using Cache Accelerate.
JS Settings
- Enable Javascript optimalisation: This setting combines all JS files into a single file except the files listed in the dissallow field.
- Compress Javascript output: This setting will compress the JS files.
- Compact Javascript files: This setting will remove all white space from the JS files. Does not have that much effect if the JS files are being compressesed (setting above)
- Enable long experation headers: This setting tells the browser to expire the JS 365 days in the future. With a far future expire date the browser will use the cached version instead of continually downloading the JS file.
CSS Settings
- Enable CSS optimalisation: This setting combines all CSS files into a single file except the files listed in the dissallow field.
- Compress css output: This setting will compress the CSS files.
- Enable long experation headers: This setting tells the browser to expire the CSS files 365 days in the
future. With a far future expire date the browser will use the cached
version instead of continually downloading the JS file.
Learn more at the Cache Accelerate Product Page
CssJsCompress
This is a free solution. This extension addresses CSS/JS optimization.
It also handles GZip which can also be handled by Joomla 1.5. It is
nice to have all settings on one screen.
Have done a litte testing with this but not fully Yet. One nice feature is the ability to exclude JS and CSS files. This is very helpful for pages that run quite a few scripts.
Not really sure what the exclude components section does. Perhaps you can exclude JReviews and then use the CSS and JS optimization in the JReviews interface.
CssJsComress Features:
- CSS files aggregation and minification.
- JavaScript files aggregation.
- GZip Compress.
- Client side cache.
Learn more about CssJsCompress at their extension page.
Rock Gzip
Have not tested this extension
Web Optimizer (WEBO)
Have not tested this version
Other JReview Optimization Articles
|