What is proxy caching
Speed is important. Even if you have optimized your site already, the load times can vary based on the physical location. You may also have a good server, but you can still improve TTFB and page load time with proxy caching.
Many sites are using Cloudflare as a CDN, however you can also use it to cache your pages, and let Cloudflare serve them to your visitors. It means, that on the first visit Cloudflare will cache the page content as well, so following requests won’t even hit your server. Of course if you are using Cloudflare for page caching you will need to enable Auto Purge for Cloudflare.
NOTE: only Cloudflare Business and Enterprise packages let you to bypass the cache based on cookies, however in most cases you can also use this feature with their free plan, but your logged in users will get the same cached pages. Of course My Account, Cart, Checkout (and any excluded) pages won’t be cached.
Let’s see how can Cloudflare caching can improve the speed of an already optimized site.
Environment:
Siteground StartUp Hosting (Bulgaria)
WordPress 5.0.3
OceanWP + Elementor (Business demo content installed)
Configuration
Swift Performance
Enable Auto Purge and set API credentials to let Swift Performance clear cache if it is necessaryAlso enable Proxy Cache and set the Proxy Cache Maxage to 1 year (30879000)
Cloudflare
Add a Page rule in Cloudflare to cache everything
Testing
We will test the site loading speed with GT Metrix from 2 locations: Vancouver, Canada and Hong Kong, China. We will choose Chrome desktop browser for the tests.First test
Swift Performance is inactive, Cloudflare standard caching enabled. Even if Cloudflare is active, it caches only static content, not the page itself.[vc_raw_html]JTNDdGFibGUlMjBjbGFzcyUzRCUyMnNwZWVkLXRlc3QlMjIlM0UlMEElMDklM0N0ciUzRSUwQSUwOSUwOSUzQ3RoJTNFTG9jYXRpb24lM0MlMkZ0aCUzRSUwQSUwOSUwOSUzQ3RoJTNFRnVsbHklMjBsb2FkZWQlMjB0aW1lJTNDJTJGdGglM0UlMEElMDklMDklM0N0aCUzRU9ubG9hZCUzQyUyRnRoJTNFJTBBJTA5JTA5JTNDdGglM0VDb250ZW50ZnVsJTIwcGFpbnQlM0MlMkZ0aCUzRSUwQSUwOSUwOSUzQ3RoJTNFVGVzdCUyMGxpbmslM0MlMkZ0aCUzRSUwQSUwOSUzQyUyRnRyJTNFJTBBJTA5JTNDdHIlM0UlMEElMDklMDklM0N0ZCUzRVZhbmNvdXZlciUzQyUyRnRkJTNFJTBBJTA5JTA5JTNDdGQlM0UxLjVzJTNDJTJGdGQlM0UlMEElMDklMDklM0N0ZCUzRTEuNXMlM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFMS4ycyUzQyUyRnRkJTNFJTBBJTA5JTA5JTNDdGQlM0UlM0NhJTIwaHJlZiUzRCUyMmh0dHBzJTNBJTJGJTJGZ3RtZXRyaXguY29tJTJGcmVwb3J0cyUyRnN3aWZ0cGVyZm9ybWFuY2UucHJvJTJGdDBLeE40ZEUlMjIlM0UlM0NpJTIwY2xhc3MlM0QlMjJmYSUyMGZhLWV4dGVybmFsLWxpbmslMjIlM0UlM0MlMkZpJTNFJTNDJTJGYSUzRSUzQyUyRnRkJTNFJTBBJTA5JTNDJTJGdHIlM0UlMEElMDklM0N0ciUzRSUwQSUwOSUwOSUzQ3RkJTNFSG9uZyUyMEtvbmclM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFMS45cyUzQyUyRnRkJTNFJTBBJTA5JTA5JTNDdGQlM0UxLjhzJTNDJTJGdGQlM0UlMEElMDklMDklM0N0ZCUzRTEuOHMlM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFJTNDYSUyMGhyZWYlM0QlMjJodHRwcyUzQSUyRiUyRmd0bWV0cml4LmNvbSUyRnJlcG9ydHMlMkZzd2lmdHBlcmZvcm1hbmNlLnBybyUyRlhDdXJlclFyJTIyJTNFJTNDaSUyMGNsYXNzJTNEJTIyZmElMjBmYS1leHRlcm5hbC1saW5rJTIyJTNFJTNDJTJGaSUzRSUzQyUyRmElM0UlM0MlMkZ0ZCUzRSUwQSUwOSUzQyUyRnRyJTNFJTA5JTBBJTNDJTJGdGFibGUlM0U=[/vc_raw_html]With Swift Performance
We activated Swift Performance and configured it. We already improved the speed, but is it enough? Not for us…[vc_raw_html]JTNDdGFibGUlMjBjbGFzcyUzRCUyMnNwZWVkLXRlc3QlMjIlM0UlMEElMDklM0N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W5rJTIyJTNFJTNDJTJGaSUzRSUzQyUyRmElM0UlM0MlMkZ0ZCUzRSUwQSUwOSUzQyUyRnRyJTNFJTBBJTA5JTNDdHIlM0UlMEElMDklMDklM0N0ZCUzRUhvbmclMjBLb25nJTNDJTJGdGQlM0UlMEElMDklMDklM0N0ZCUzRTAuNXMlM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFMjg2bXMlM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFMjI0bXMlM0MlMkZ0ZCUzRSUwQSUwOSUwOSUzQ3RkJTNFJTNDYSUyMGhyZWYlM0QlMjJodHRwcyUzQSUyRiUyRmd0bWV0cml4LmNvbSUyRnJlcG9ydHMlMkZzd2lmdHBlcmZvcm1hbmNlLnBybyUyRjU0dFUzdENLJTIyJTNFJTNDaSUyMGNsYXNzJTNEJTIyZmElMjBmYS1leHRlcm5hbC1saW5rJTIyJTNFJTNDJTJGaSUzRSUzQyUyRmElM0UlM0MlMkZ0ZCUzRSUwQSUwOSUzQyUyRnRyJTNFJTA5JTBBJTNDJTJGdGFibGUlM0U=[/vc_raw_html]
Conclusion #1
The most important factor for user experience is Contentful paint time. We decreased it to 2-300ms, which is almost instant load. That means when the user clicks your link in Google results, the page will be shown instantly on their device.
But there is an other important aspect: load time on 3G
Testing on 3G
We will test the site loading speed with GT Metrix from 2 locations: Vancouver, Canada and Hong Kong, China. We will choose Chrome desktop browser for the tests again, but now we limit the connection speed to 3GFirst test
Swift Performance is inactive, Cloudflare standard caching enabled. Even if Cloudflare is active, it caches only static content, not the page itself.[vc_raw_html]JTNDdGFibGUlMjBjbGFzcyUzRCUyMnNwZWVkLXRlc3QlMjIlM0UlMEElMDklM0N0ciUzRSUwQSUwOSUwOSUzQ3RoJTNFTG9jYXRpb24lM0MlMkZ0aCUzRSUwQSUwOSUwOSUzQ3RoJTNFRnVsbHklMjBsb2FkZWQlMjB0aW1lJTNDJTJGdGglM0UlMEElMDklMDklM0N0aCUzRU9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UlMEElMDklMDklM0N0ZCUzRSUzQ2ElMjBocmVmJTNEJTIyaHR0cHMlM0ElMkYlMkZndG1ldHJpeC5jb20lMkZyZXBvcnRzJTJGc3dpZnRwZXJmb3JtYW5jZS5wcm8lMkZGTm1XandtcCUyMiUzRSUzQ2klMjBjbGFzcyUzRCUyMmZhJTIwZmEtZXh0ZXJuYWwtbGluayUyMiUzRSUzQyUyRmklM0UlM0MlMkZhJTNFJTNDJTJGdGQlM0UlMEElMDklM0MlMkZ0ciUzRSUwQSUwOSUzQ3RyJTNFJTBBJTA5JTA5JTNDdGQlM0VIb25nJTIwS29uZyUzQyUyRnRkJTNFJTBBJTA5JTA5JTNDdGQlM0U0LjRzJTNDJTJGdGQlM0UlMEElMDklMDklM0N0ZCUzRTQuMiUzQyUyRnRkJTNFJTBBJTA5JTA5JTNDdGQlM0UyLjFzJTNDJTJGdGQlM0UlMEElMDklMDklM0N0ZCUzRSUzQ2ElMjBocmVmJTNEJTIyaHR0cHMlM0ElMkYlMkZndG1ldHJpeC5jb20lMkZyZXBvcnRzJTJGc3dpZnRwZXJmb3JtYW5jZS5wcm8lMkY1NHRVM3RDSyUyMiUzRSUzQ2klMjBjbGFzcyUzRCUyMmZhJTIwZmEtZXh0ZXJuYWwtbGluayUyMiUzRSUzQyUyRmklM0UlM0MlMkZhJTNFJTNDJTJGdGQlM0UlMEElMDklM0MlMkZ0ciUzRSUwOSUwQSUzQyUyRnRhYmxlJTNF[/vc_raw_html]
Conclusion #2
We decreased the rendering time (contentful paint) to 2.2s. If you imagine yourself with your phone in your hand, you just clicked to a link somewhere, and you need to wait 5-7s to see the content, or only ~2s you can imagine the difference 🙂