Claus Heinrich
w3 total cache

Caching, GZIP, Minify & CDN – Introduction

The speed of websites has become a hot topic worldwide – Faster page load speed gives the users a better experience while browsing your website, in addition it will benefit you in search engines like Google. (Speed is included as a factor in the calculation of how your site should be placed in search results).

You can achieve faster pageloads by using Caching and reduce the workload of the server by providing users with cached files instead of all users create their own database / file calls when a page is visited. This means that your website will be much better equipped to handle large spikes of traffic. (Known as the Digg effect).

I’ve split up this article about Caching, GZIP, Minify & CDN up in 4 parts, due to the volume.

  • Introduction to caching, GZIP, Minify & CDN (reading now)
  • Configuring W3 Total Cache. (coming soon)
  • Configuring the CDN (Content Delivery Network). (coming soon)
  • Connect W3 Total Cache and CDN. (coming soon)

I have previously used a well-known plugin (WP Super Cache) on my WordPress blogs to cache / compress my data and it has proven good for my needs.
But around a month ago, I stumbled upon a new and fantastic plugin for WordPress – W3 Total Cache, which beats the hell out of WP Super Cache. You get plenty of opportunities to set it precisely to your needs and I will guarantee you it can reduce the load times on your own blog. (when properly setup of course).

To mention some of the possibilities with W3 Total Cache plugin:

  • Caching through disk cache / memcache / APC of your pages, files and RSS feed.
  • Compression with gzip + deflate of your theme, plugins, CSS, JavaScript files.
  • Minify your CSS / JS / HTML / Feed + the opportunity to combine and group the CSS / JavaScript in order to reduce DNS lookup. (requires PHP 5)
  • Caching of database calls.
  • The ability to easily use the CDN. (Content Delivery Network)

Each option gives you plenty of choices to configure them to suit your needs. They will all in various ways help to improve the speed of your blog, and overall, they can actually move a lot.
I just made a few measurements with YSlow on a few of my own blogs you can see below – gives a picture of the effect when it is setup well. (There are still plenty of room for improvement on both blogs, so I expect to reduce the loadtime even more soon)

Page Speed Snyd.dk (Each number is the second calculated average of 10 measurements)
Page / Step Frontpage Category Post Search
Without the use of Cache 6,9 6,2 8,0 6,5
With WP Super Cache 5,8 5,0 6,9 5,1
With W3 Total Cache 3,1 2,9 3,4 2,8
W3TC + CDN 1,5 1,8 2,0 1,3
Page Speed Linkfeed.dk (Each number is the second calculated average of 10 measurements)
Page / Step Frontpage Category Post Page w/o Pic
Without the use of Cache 7,7 4,6 4,7 2,9
With WP Super Cache 6,5 4,0 4,3 2,0
With W3 Total Cache 4,4 2,1 2,1 0,5
W3TC + CDN 4,0 2,0 1,9 0,4

CDN has not a dramatic impact on Linkfeed.dk, but it is also a theme without much graphics in. Besides the thumbnail provider I use is slowing the page down a bit.

You can clearly see from the table that it has paid of to use this plugin – it has reduced the speed tremendously for both examples. Snyd.dk is a blog that has more than 8000 unique visits/40000 pageviews daily. It is really important for me to be able to deliver a super fast webpage for all users. It will do 2 great things – keep the users happy and reduce the load/ressources on my server.
The search engines also give a little bonus for faster page – who wouldn’t want that?

W3 Total Cache can be used directly by simply activating it, but the great advantages are first obtained by tweaking every option. You can easily spend several hours on this.
You can get inspired by my setup through the links in top of the post.

Reading material:

Resources:

6 Comments

  1. Hej Claus

    Et meget forsinket tak for en god artikel. Faktisk har jeg flere af dine “tuningsartikler” bookmarket i min Firefox – de er sgu kvalitet!

  2. Takker Thomas 🙂 altid dejligt når andre kan bruge det man har selv har kæmpet med at få sat lidt i system.
    Gik dog lidt død i at få lavet denne færdig på engelsk 🙂

  3. Også lidt ros herfra! God læsning 🙂
    Dejligt at lære om nye plugins. Og dette lyder som et jeg hellere må få tjekket ud snart!

  4. God læsning, med gode inputs der er værd at overveje. Pagespeed er ikke noget jeg har givet så meget tanke, men måske man skulle rette fokus mere den vej.

    Hilsen Steen

  5. Tak for et godt indlæg! har delt dette oplæg til vores medarbejdere, da det er super informativt og noget som alle bør vide. Vi gør meget ud af, at gøre tingene ordenligt her hos: SEO-Partnrse – Hvilket din artikel afspejler.

Leave a Comment