You are using your CDN wrong, and itβs hurting your marketing efforts
Every digital marketer I know is fanatic about their websiteβs performance and for good reasons. Your siteβs speed affects its rank on Google search, your visitor conversion rates, and recently even affect the chances of your siteβs social shares to spread on Facebookβs news feed – Facebook might actually βpunishβ you now if your website loads too slowly.
Improving your siteβs slow load time might be a long and expensive process, depending on your siteβs infrastructure, but thereβs one quick and easy fix that can make a big dent and all it involves is a slight change to how your CDN is configured.
How does a CDN help with your siteβs performance
A CDN is a network of servers that are distributed in different locations around the world. Its purpose is to locally distribute your siteβs static files – files that donβt change often (such as images, style sheets, javascript files, etc.), so remote visitors wonβt have to βcross the globeβ to access your server.
For example, letβs say your websiteβs servers are located in California. People accessing your site from San Francisco would probably enjoy a faster load time than people accessing it from London. Adding a CDN will allow visitors from London to get the same static files from a European server, and by doing so reduce their load time.
Although locally serving static files through a CDN might reduce your siteβs load time, in most Content Management Systems such as WordPress it might not be enough.
The issue with WordPress (and most CMSβs)
When you visit a WordPress website, the pages are not hard coded, instead WordPress creates the page on-the-fly and serves it to you. This mechanism allows you to update your website without needing to code but also makes it slower since it forces your visitors to reach your server directly.
Applying this on the example above, with a standard CDN implementation, your London visitors might get the static flies from the European server (provided by the CDN) but will still need to wait for your server in California to create and serve the rest of the page.
Close, but no Cigar.
Enter Dynamic Page Caching
We had to face this issue head on a few months back when we onboarded a new client. The client had a poorly built, slow loading website and we were requested to find a cheap & quick solution to improve load time. Although having a CDN standardly configured, the siteβs average load time was still around 10 (!!) seconds. Without making substantial changes to the siteβs infrastructure this was a tough cookie to crack.
Having vast experience with WordPress powered websites, an idea came to mind – Dynamic Page Caching.
With Dynamic Page Caching, instead of caching just static files (such as images, CSS and JS files), we cache each page in full, thus serving 100% of the assets from the CDN, without having visitors ever reaching the remote server.
After enabling Dynamic Page Caching, the results were clearly decisive. The siteβs average load time has improved by 80% and reduced from around 10 seconds to 2 seconds.
When should you use Dynamic Page Caching
While quickly loading your web pages is the wet dream of every digital marketer, this solution comes with a certain price – all of your website pages become cached. this means any change done to the page (can either be layout, content, design, etc.) does not show immediately until the CDN cache is cleared. This might take a while to propagate throughout the entire network.
This makes this architecture not suitable for all types of websites. Itβs great for sites that donβt change on a daily basis, like promotional and marketing websites, or blogs that post new content once or twice a week. Itβs however not recommended for sites with frequently changing content such as e-Commerce platforms, forums, blogs that post daily, and almost all web-apps and SaaS products.
How to get started
Unfortunately, this is not a How To type of article, mainly because the solution varies from site to site and it highly depends on your CMSβs configuration, your CDN, and the content being delivered.
You can start by sending this article to the person maintaining your website and asking if Dynamic Page Caching can be a suitable solution for your website. If you feel you need some help or a more personal advice regarding your specific website feel free to reach out to us here at AirFleet. This stuff is our bread and butter, and we are always happy to help in anyway we can.