Support

Admin Tools

#40537 Caching, compression in one place or multiple places simultaneously?

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.0.3
PHP version
8.3.3
Admin Tools version
7.4.9

Latest post by formfranska on Sunday, 07 April 2024 08:47 CDT

formfranska

Caching, compression in one place or multiple places simultaneously?

I'm using Admin Tools Professional's .htaccess Maker with the following enabled:

- Set a long expiration time for static media
- Automatically compress static resources
- Force GZip compression for mangled Accept-Encoding headers
- HSTS Header (for HTTPS-only sites)

Should I also enable both
- Joomla built-in caching (Progressive Caching)
- Joomla built-in Gzip Page Compression

Or should I leave Joomla's built-in options OFF when using the 4 options above in Admin Tools Professional's .htaccess Maker, please?

I have Joomla's options set to OFF for now but then I read your article https://www.dionysopoulos.me/joomla-performance-tuning-ii-basic-settings.html and suddenly I'm unsure.

PHP 8.3.3
Joomla 5.0.3
Admin Tools Pro 7.4.9

Please advice

Best regards
Anna Robinson

nicholas
Akeeba Staff
Manager

The settings in .htaccess Maker (except HSTS) deal with static content such as CSS, images, JavaScript, font files, etc. Having them enabled is recommended, as they tell your visitors' browsers to keep these files cached on the client side, and they tell your web server to deliver them compressed which minimises the server bandwidth usage.

The HSTS option is not a caching option per se. It tells the web browser that this site is only to be accessed over HTTPS. The web browser remembers it, so next time a visitor tries to access the plain HTTP version (e.g. by typing the URL to your site directly, but without the https:// schema prefix) the browser will immediately go to HTTPS instead of doing a roundtrip to your site first. Highly recommended for privacy, security, and performance, but not a caching option per se.

Now, as you may have spotted, we didn't talk about dynamically generated content i.e. the pages Joomla creates - usually HTML, but sometimes may be other formats (RSS, Atom, XML, JSON, ...). This is where Joomla's built-in caching comes into play. Whether to use it or not depends on your site. If you have a site like ours where more than 90% of the site access is behind a login and personalised it makes no sense. If you have a mostly public site which doesn't use a login module (because that's also personalised after logging in!) do check if using caching makes sense. I have seen many sites which become slower when file-based caching is enabled. Conversely, I have not seen any commercial hosting environments supporting Redis or Memcached for caching (these are indeed fast, as they are memory-based). Benchmark your page access with and without cache to see if caching makes sense for your use case.

Do not enable Joomla's GZip page compression. It is slow, and causes problems when there is a PHP error on your site. The "Automatically compress static resources" feature in the .htaccess Maker already tells your web server to send HTML content over the wire in a compressed (GZip) format, as long as you have a web server version published in the last ~10 years. The compression applied by the web server is an order of magnitude faster than what Joomla! can do, and does not suffer from any adverse effects.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

formfranska

Thank you so much for your informative reply 🙏🏽

In summary (if I've understood it correctly):

1. Do NOT enable Joomla built-in Gzip Page Compression
2. Joomla built-in caching can be ON (check to see if it speeds things up, if not leave it off)

I will do the checking with Joomla built-in caching ON or OFF and see which option gives the best speed test result.

Best
Anna

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!