We now host and support WordPress. Start building now with a FREE DEMO!

+1-231-421-7160

A Comprehensive Guide to Joomla Compression and Caching

The Basics of Compression and Caching

When visitors come to your site, their browser displays content that is served from a web server. The web server is told what content to send based on the output of the Joomla application. Each page that the visitor loads requires Joomla to generate content into an html page for the visitor's browser. Sometimes Joomla has to generate the same content over and over. When this happens, site administrators can take advantage of caching to reduce the amount of work required from Joomla and the web server, which can greatly improve performance.

Compression comes into play when the files and data that is generated by Joomla gets sent from the web server to the browser. In many cases, compressing that data can increase the speed at which the data is sent, as well as the performance of the web server itself. In combination, these two factors can greatly decrease the speed at which your pages load for site visitors.

Types of Joomla Compression and Caching

View Caching (System - Cache Plug-in)

cache1

Extensions > Plug-in Manager > System - Cache

If activated, the system cache grabs a snapshot of the content of your Joomla site as it loads for a visitor. It then stores that output inside of a folder in your tmp directory. Every page that loads produces a new output into that directory. When another visitor loads the page, the content may be pulled from this tmp directory instead of actually having Joomla output new content. This plugin can improve performance, but if you have content on your site that frequently changes, the System Cache Plug-in can serve stale content to site visitors ... and nobody likes stale content. By default, this plugin is disabled within your Joomla site.

Page Cache

cache2

Extensions > Plug-in Manager > System - Cache > Basic Options

Joomla site performance can be increased dramatically by utilizing the System - Cache Plug-in, unfortunately this plug-in is not applicable in all situations. Essentially, this plug-in takes a snapshot of Joomla’s output when a page is requested. That snapshot is then stored and served to the next visitor. This plug-in gives you the option of turning on “Browser Caching” which will actually store the cached content within the visitor’s browser, further increasing speed. It is important to note that this caching method does not work well for dynamic content, so if you have a simple site with static content, give it a try. Otherwise you may find it causes some issues.

Progressive vs. Conservative Caching

cache3

Global Configuration > System > Cache Settings > Cache

Some sites may benefit from caching all modules, and others may not handle that too well. If your modules contain all static content, then start by using Progressive Cache, which will cache all modules in one swipe. If your modules contain dynamic content, and you want to be able to control caching at the module level, select Conservative Caching.

Conservative Caching at the Module Level

cache4

Module Manager > Module > Options > Advanced Options > Caching

If you need to use Conservative Caching in your Joomla site, you can enable/disable caching at the individual module level by going into that module and selecting the Advanced Parameters. You can turn the caching for individual modules on or off at that level for a molecular control over your site content.

Gzip Compression

cache5

Global Configuration > Server > Server Settings > Gzip Page Compression

Using Gzip Page Compression reduces the file size and the amount of time it takes to send the file from the server to the browser. The amount of compression can be up to 90%! The downside to using Gzip Page Compression is that both the server and the browser have to perform compression and decompression respectively. This requires additional resources. Fortunately, the CloudAccess.net servers are robust and up to the task of using Gzip Page Compression.

Additional Compression & Caching Plug-ins

There are plug-ins available in the Joomla Extensions Directory (JED) which provide additional file compression. Of course, we must disclaim that you if you one of these plug-ins, you’re testing at your own risk. You can rest assured, however, that your site data is safely backed up at CloudAccess.net.

See the full list of caching extensions available at the Joomla Extensions Directory

See the full list of site performance extensions available at the Joomla Extensions Directory

The Bottom Line

Caching and compression can greatly improve the performance of your site, and you have many options, but you must choose carefully when deciding what to enable. Joomla is a complex and dynamic application, and no two Joomla sites are alike. We recommend using the trial and error methods to determine what works best for your individual site. You may find that enabling some caching methods greatly increase performance while others disable your site completely. We always recommend launching a separate “dev” site to perform testing. These dev sites sit on the side of your production site and allow you to do testing without the fear of causing problems.

Comments

in Joomla Tips & Tricks Hits: 78097

About the author

Prior to becoming CEO of CloudAccess.net, Jonathan served as Cheif Operating Officer for the company and played a pivitol role in shaping CloudAccess.net for close to 3 years. Originally joining the team as Project Manager in 2010, Jonathan successfully oversaw CloudAccess.net Professional Services before stepping into the role of Support Team Manager. Known as a jack of all trades, it wasn’t long before Jonathan had a hand in managing the DevOps and Platform Teams as well as contributing to the Marketing, Human Resources and Public Relations Teams. Being an integral part of the team that grew the company to host over 20,000 websites with more than 30 employees in 4 offices worldwide, Jonathan was the natural choice to take over as CEO in April of 2014. In his spare time, Jonathan is a UAV Flight Instructor at Northwestern Michigan College in Traverse City, Michigan. He also plays a variety of instruments and enjoys robotics, kite-surfing and stand-up paddleboarding.