Question

Lately I've become somewhat obsessed with page speed optimization and I wanted to find out can CMS caching mechanism (For example Joomla cache), Gzip compression and Cloudflare work all together in perfect harmony?

I understand how each system works by itself (more or less), but I don't understand would they work together. Is it even recommended to use all of them at once?

If I use cloudflare do CMS cache and Gzip even matter?

P.S What other tools do you use?

Was it helpful?

Solution

can CMS caching mechanism (For example Joomla cache), Gzip compression and Cloudflare work all together in perfect harmony?

Yes, plus they all do slightly different things.

Cloudflare caches the static content, eg images and stylesheets. Fresh page HTML is still downloaded by every visitor on every page.

Gzip compression comes into play both with Cloudflare and your server. By default Cloudflare automatically compresses content passing through it's system, Files not passing through Cloudflare can be compressed by your server, Caching and gzip compression by htaccess , though since you are using Joomla, the easiest way to enable this is from
the control panel > system > global configuration > server > Gzip Page Compression.

This will decrease download times for the page HTML and the dynamic content produced by Joomla.

Using Joomla cache will typically reduce page load times because instead of Joomla using modules and plugins to recalculate the dynamic page content everytime for every visitor, it will simply use the saved cache content. You can cache Joomla content by page, by module or by plugin, here's one good explanation of the differences.

It's worth spending some time testing with a tool like WebPageTest to find the best Joomla cache option for your specific site. I've sometimes had significant savings with this.

It's makes sense to have all 3 working on your site, it will reduce server load and speed up page display.

Good luck!

OTHER TIPS

Just a heads up. Some content in certain browsers can experience byte range request issues if you have gzip enabled while using cloudfare.

For instance, depending on server, Safari will (most likely) not play mp4 video served through cloudfare and gzip enabled server. Gzip can interfere with byte-range separation of requests.

I ran into this issue before and figured I would share in case anyone runs into any of these issues.

If you want to have gzip enabled, but experience issues with certain files, you can disable gzip for those specific files in .htaccess by adding this:

<IfModule mod_headers.c>
<FilesMatch "\.mp4$">
    RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
</FilesMatch>

Just replace .mp4 with file type if issues with any others.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top