Cache / Static Page Caching

What is Static Page Caching for WordPress?

| 5 min read |

Poor website speed is a killer for any website. With today's broadband speeds, consumers no longer accept dialup speed load-times. A slow website can be a sign of a poor quality business, so page speed should be top priority when you design and build your web presence. According to surveys done by Akamai and, half of your visitors expect a website to load in two seconds or less. If your site loads in three seconds, you've already lost 79% of your potential sales. Website speed is the foundation for your site's success. Build a strong website on a fast foundation, and the sky's the limit. Have poor speed, and your website can fall apart at any time.

Every second counts in website design, so even the smallest change can have enormous benefits in terms of speed. One change that's a lot less complex and low cost than many other performance enhancements is caching. Several factors go into site speed, but caching can shave several seconds off of a slow website and decrease page load time to less than 100 milliseconds.

Understanding the Way a Web Page Works

Before you can understand caching and its benefits, you should first understand the way a web page renders in a user's browser.

Each time a customer types your business URL into a browser, the browser first does a lookup for the IP address using DNS. After the IP is found, the browser requests the URL's content from the server.

Twenty years ago, it was common for a website to have standard, static HTML pages. These pages did not change regardless of who, when, or where the page was rendered from. There was no database storing information for pages to load. It was just a static page that did not change.

As technology evolved, databases were integrated into web development. Take a standard e-commerce store as an example. The e-commerce pages display products based on a user's queries. Most elements on an ecommerce page are dynamic, including the main content, breadcrumbs, and parts of the navigation menu. Each time a page is requested, the web server makes a call to the database, waits for it to process the query, and retrieves the data. The web server then renders the data on the page dynamically.

As you can probably guess, a dynamic page takes much longer to load because of the processing time between sending a query to the database server, waiting for it to process the request and then waiting for it to return the data. The entire process takes milliseconds, but it leaves a lot open for performance degradation. Too little bandwidth, poor programming, or a slow database can hinder performance.

How Caching Works

Several elements on a web page never change. Images, CSS and JavaScript files, footers and headers rarely change. These elements change when there is a major upgrade but stay the same for months at a time. They don't use data from the database, so no dynamic content is loaded.

Caching speeds up your site by storing these files in RAM (AKA "cache"). Loading content from RAM is much faster than loading from a hard drive. Since static files don't change, the server moves them to RAM, so each time the content is requested it's loaded from the fastest storage component available on the server.

With page caching, you can also store dynamic pages that still load dynamic content but where that content remains the same for a long period of time. For instance, your navigation page could be dynamic but it stays the same until you deploy an upgrade. Caching stores common dynamic pages and their data that are requested frequently. Any page stored in cache (RAM) speeds up the website load-times, but remember that each page uses some of your memory. You should determine which pages are requested frequently enough to cache them, because too much caching can exhaust server resources.

WordPress also has an internal API that allows a developer to control caching objects. Developers can create plugins specifically for WordPress sites and reduce the number of times pages make calls to the database.

Testing Your Site

You might not  know if your site needs to use caching, or that it's loading too slow. There are two main testing tools on the market.

Google PageSpeed Insights is a speed tool that tests your site on both desktop and mobile devices. It even gives you suggestions on what you can do to speed up your site. Compression, caching, and minifying elements are three areas Google will give you advice on should your pages load too slowly

Another major tool is GTmetrix. It's less popular because it's based on Yahoo's speed guidelines. It's still a good way to ensure that you've covered all possibilities for your site's performance.

Remember that you don't need to comply with every suggestion. If your pages load quickly, then having compressed images or browser caching might not be necessary. It's up to you and your developer to decide which caching options are necessary to keep a site within recommended load times.

Sample Benchmarks

If you’re curious about facts and results, WP Dev Shed has an excellent table of speed results from various plugins on the market. The table should help you decide which one is best for your site.

WordPress also has an API that lets developers manipulate cached objects, so you can customize caching using a developer and some innovation. If you want the fastest speeds available for your site and customers, caching is an inexpensive way to give your WordPress site a speed boost.


Enter your email to get weekly blog updates