Guess what happens when a website is slow? No one visits it.
Loneliness creeps in and soon, no one remembers the name of the website. It won’t show up on decent search engine ranking positions.
Sorry, I got a little dramatic.
However, it’s true. Slow websites get no love. Therefore, you need to find a way to optimize your WordPress website. The easiest way of doing it is through a caching plugin.
What is WordPress Caching? (Caching Explained)
To completely understand WordPress caching, let’s first take a look at what exactly happens when anyone visits your website.
First, your visitor’s browser contacts your web server to fetch your website’s data. Your visitor can be accessing your website from anywhere. It can be a mile away from your web server or can be half way across the world from it.
Second, your WordPress will contact the website’s database where it is installed.
Third, the database compiles the data, converts it into an HTML page, and sends it back to the user.
The entire process repeats itself whenever the user refreshes the page. Your user’s browser requests all the images again and the data from the MySQL database will be recalled whenever he visits your website.
How would you like if your visitors’ browser store the images in their local hard drive and the WordPress saves the data fetched from the database until you make any changes?
This is exactly what WordPress caching does. Caching is the process of recycling the data which has already been fetched to speed up your WordPress websites. Caching minimizes the number of times data is flown between the visitor and the database. It reduces the number of requests, which ultimately reduces website load time.
Types of Caching
Caching can be divided into Client Side Caching and Server Side Caching.
1. Client Side Caching
Client Side Caching is when a web browser keeps a cache of all the files from your WordPress website. This includes HTML files, images, Java scripts, and CSS files. As a WordPress site owner, you need to set caching rules.
Setting Cache rules will allow your web browser to ensure that there are no changes made to the data since it was last saved before using the cached copy.
Client-side caching is especially helpful with static images as they hardly change after you have published a content. This contributes greatly to reducing the load time of your website.
2. Server Side Caching
As the name suggests, server-side caching is data that is stored by your WordPress server. If your WordPress website has a WordPress cache plugin, it can perform this type of caching.
The cache plugin can create caches of HTML pages which will save all the different elements of your web page including the header, body content, footer, sidebar, etc. These elements will then be served to multiple users through the cache.
This article was written by Moeez and originally published on WPblog.