I am using the standard distribution of Moodle 1.6 using the Windows XAMPP distribution found on download.moodle.org. To enable compression, make the following two changes to the file httpd.conf found at C:\moodle\apache\conf.
- Un-comment the line:
LoadModule deflate_module modules/mod_deflate.so
- Add the line:
AddOutputFilterByType DEFLATE text/html text/plain text/xml
Save and restart Apache.
A couple of notes:
- If you want to compress all files, change the AddOutputFilterByType line to:
- Some very old browsers don't like compression, so for this and other reasons, you may want to read http://httpd.apache.org/docs/2.0/mod/mod_deflate.html for more information.
My experiments, with 10 page loads each on a large home page with many courses was:
- Without compression: 2.51 seconds
- With html files compressed: 1.04 seconds
- With all files compressed: 1.11 seconds
For things other than simple page loads, there was a 10% improvement when downloading lots of pictures such as at a at /userpix or for uncompressed .exe file or movies, but I decided that page load time and keeping the processor available was more important which is why I just compress HTML pages.
This was with a fast server (dual XEON processors); I got about a 30% improvement in speed with an out-of-date processor with a satellite connection on a server in Africa and a smaller home page: still significant, but not as impressive as the above.
Hope this helps.
Moodle Master and Math Department Head