What is Web Caching?

Web caching is caching of Web documents to improve performance, reduce bandwidth consumption and server load. Web cache stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. Web caching can significantly enhance the user´s Web browsing experience.

To emphasize, this article discusses Web caching for a dynamic Website and specifically for a WordPress Website. By default, each time a user visits your dynamic Website, WordPress will go through sometimes a lengthy process to build and display everything you see on your screen. First, WordPress PHP core code makes numerous calls to the database and finally outputs the HTML page for the browser to display. By integrating a cache mechanism, the dynamic Web pages are converted into static files and stored, so a visitor downloads the static files rather than interacting with the database every time.

Does Web caching speeds up your Dynamic Website´s load time? ABSOLUTELY…

How does Caching work?

Dynamic Websites are continually updating their pages with fresh content. There are checks in place to ensure that the content displayed for the user is current. Caching mechanism must be equipped with an expiration that would delete the cache when content has been changed. The real value of caching is that it serves static copies of files your Website would otherwise serve dynamically. Caching is an excellent way of decreasing the stress on the server by running more static files and less queries.

The following image shows how caching works from the user perspective.

Different ways to cache a Dynamic Website

There are several ways to cache your dynamic Website. In general, you could either use an external extension (add-on or plugin), add the code to the .htaccess file (do it yourself caching), or use the control panel especially for Windows IIS server.

Below are few references:

What about Bandwidth?

No question that Web caching saves bandwidth usage, especially when the cache is stored locally on the user´s computer. Also Etag allows cache to be more efficient, and saves bandwidth, as the Web server does not need to send a full response if the content has not changed.

Why Website Speed is Important?

Your blog’s loading speed affects more than just user experience but it is now a factor used by Google´s ranking algorithm. The reasoning according to the official Google Webmaster Central Blog, is to provide the most relevant search results from Websites that offer the best user experience. Website speed is something that we cannot ignore.

Caching a WordPress Website

Why the need for a cache plugin?

Despite its wide adoption across the Web as a blogging and a CMS platform, WordPress is memory hungry. This high memory usage becomes apparent when your blog goes down due to server overload from the high number of visitors.

Caching dramatically eases the load on your server by presenting static files to users instead of making numerous calls back and forth to the database. A cache plugin stores the dynamically generated page as a static page. This static page is then served to the visitor. There are several plugins to choose from including WP Super Cache, WP Fastest Cache, and W3 Total Cache.

W3 Total Cache

The plugin of my choice is W3 Total Cache as it combines not only page caching, but also browser caching, database caching, object caching, compression, minification and CDN integration. CDN basically caches your Website´s static files on servers all over the world and then serves them from the node closest to the user.

W3 Total Cache is the most complete WordPress performance optimization plugin. It improves user experience by improving server performance, caching every aspect of the Website, reducing download time of Web pages and delivers almost instant second page views. Many popular blogs rely on the W3 Total Cache plugin for better Website performance.