W3 Total Cache Configurations

This article is about wordpress plug-in used for improving the performance of this blog. This blog has serious issues on response time. Several readers has reported that, it takes while for loading the site. One of the main challenging issue with using the wordpress platform is tons of plug-in which would drastically impact the performance of website loading time. When I have used the plain website with HTML pages, the response time was very good. But, managing the content is not easy without wordpress like Content Management Systems (CMS). There are few great plug-ins available to improve the performance, but it needs little learning curve to understand the complete configurations to super charge your blog.

W3 Total Cache is one of the greatest plug-in available and it is rated as the best caching plug-in out in the market. It helped me to improve the website loading time drastically and I would like to share some of the configurations used for improving the efficiency. If you have any suggestions, please write it in the comments section. I would explain only few important items which will enhance the performance.

wordpress-logo

1. Install W3 Total Cache

It is very simple to install W3 Total Cache plugin to your wordpress blog. In the plug-in area, search for the “W3 Total Cache” plug-in and you will find this plugin as the first one.

Install W3 Total Cache

Just click on the “Insiall” link and it will install and activate the plug-in. Once the plug-in is installed, list of configurations items will be displayed on the left navigation bar as shown below.

w3 total cache options

2. General Settings

In the general settings tab, all the configurations options would be displayed. This is the page where you have to enable or disable a particular configuration item. It is a summary of all the configurations items. Each configuration items listed on this page has separate tab for the details configurations. In the next sections, I would explains some of the few important configuration sections.

w3-total-cache-general-settings

3. Minify

This is most important section to make the changes. Minify is simply reduces the size of the resources and also compress with the less number of files. Take an example, if you have 10 CSS files to be loaded on one page, requires 10 http requests to download that files which is repeated round trip to the server. Multiple http request would slow down the page loading time. Also learn about the pipelining.

To overcome the above problems, Minify option could effectively reduces the number of files to be downloaded. The following screenshots are the settings for each section under minify.

w3-total-cache-general

w3-total-cache--minify-html

w3-total-cache-css

w3-total-cache-js

3. Browser Cache

This is another place where you can optimize your site for the local cached files. It is reported that, more number of sites loading time is impacted on loading the repeated files. This would have been improved by caching it in the browser. The following are the preferred settings for the each sections. Enable the below options under each section.

General:

  • Set Last-Modified header
  • Set expires header
  • Set cache control header
  • Set W3 Total Cache header
  • Enable HTTP (gzip) compression

CSS & JS:

  • Set Last-Modified header
  • Set expires header (Expires header lifetime : 31536000)
  • Set cache control header (Cache Control policy: Cache with max age)
  • Set W3 Total Cache header
  • Enable HTTP (gzip) compression

HTML & XML:

  • Set Last-Modified header
  • Set expires header (Expires header lifetime : 7200)
  • Set cache control header (Cache Control policy: Cache with max age)
  • Set W3 Total Cache header
  • Enable HTTP (gzip) compression

Media and Other Files:

  • Set Last-Modified header
  • Set expires header (Expires header lifetime : 31536000)
  • Set cache control header  (Cache Control policy: Cache with max age)
  • Set W3 Total Cache header
  • Enable HTTP (gzip) compression

4. Other Configurations

There are many other configurations which can be configured to optimize the performance. But, it is not applicable for all the sites, I am not covering those details here. The above configurations are the only solution for the shared hosting servers. If your website is running on dedicated server, then you have the multiple caching techniques to improve the speed. One of the solution is using the Content Delivery Network (CDN).

I have used several websites to understand these techniques. This may not be the complete guide for configuring this plug-in, if you drop a comment, I would help you in optimizing this plug-in. Or please refer this website inspire2rise.

Once you have made the changes, run the speed test using google speed test. This site is a great tool to see what is the loading time for your site. This also provides suggestion to improve the performance.

Comments

comments

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Speak Your Mind

*