Using Cloudflare to Improve WebSite Speed to less than 90 secs
In the website load test of my site, I found that it loaded in 1.3secs. This was without using any cache plugin or CDN (content delivery network). I also used very less plugins to reduce the performance delay caused by them.
I was able to achieve good desktop and mobile page speed field data according to PageSpeed Insights (PSI) tool. According to this document, Lighthouse provides a performance score. If you are able to get 90 or above, then the web page is considered to be fast.
PageSpeed Insights Test Results – Without Cloudflare
The two metric data that are to be considered for speed analysis are – First Contentful Paint (FCP) and First Input Delay (FID). An overall label of Fast is given if both FCP and FID are fast.
As a test study I considered a web page from one of my sites.
Desktop Score
In the desktop test, I was able to get FCP value of 0.7s and Max. Potential First Input Delay (FID) of 20ms. According to the PageSpeed Insights report, these are considered fast. This can also be seen from the fact, that those metric data are shown in green.
Mobile Score
In the mobile test, I got FCP of 2.3s and FID of 20ms. It still shows that these two field data are green. By design, my WordPress theme was responsive and mobile friendly. I did not yet implement the AMP pages on this site, but the mobile speed results were astonishing.
PageSpeed Insights Test Results – With Cloudflare
I also tested the same page using Google PageSpeed Insights testing tool for speed. The Lab data for mobile results show the following. The FCP and FID values were 2.0s and 20ms respectively. It indicates a fast site according to the tool’s classification.
The desktop metric data was also positive with a score of 97. The FCP and FID values were 0.6s and 20ms. It again indicates that the site is fast enough on desktop version too.
This tool shows that there is drastic speed improvement regarding metric data for mobile results after using Cloudflare which is an indication of its efficiency.
GTMetrix Test Results – Without Cloudflare
The fully loaded time in this this test was 1.4s. The PageSpeed Score was 75% with C grade and YSlow Score was 70% with C grade. The TTFB timing was 0.6s and RUM Speed Index was 995. The latter is an indicative of speed performance of your site. The total Page Size was 1.06MB and there were 26 requests.
GTMetrix Test Results – With Cloudflare
The GTMetrix test was again done on the same page, after using Cloudflare. The PageSpeed Score and YSlow Score were respectively C(78%) and B(82%). The fully loaded time was 1.3s with a total page size of 0.97MB and 27 requests.
Conclusion from GTMetrix Test Results
From the metric data obtained from GTMetrix test results before and after using Cloudflare, we can say that there is not much of a difference.
Not much of WordPress plugins. JS, CSS to be optimized is also less. It was a bare-bone site with less visual loading features.
No Ads. This also has resulted in low page loading time.
KeyCDN Speed Test
TTFB Results – Without Cloudflare
I used the tool by keycdn.com to check the asset performance test results of my page from 14 locations. One of the key important metrics to improve wordpress page load times is to reduce TTFB values below 200ms.
The below screenshot shows that my TTFB values are not green from all locations.
Though I get good metric from locations near to my server, the farthest regions have longer times.
For example, Amsterdam location shows a TTFB value of 1.6s. This negatively impacts the website page speed performance.
TTFB Results – With CloudFlare
I repeated the same test using the same tool after enabling Cloudflare on my site. You need to change the nameservers on your DNS provider to reflect the changes. When you ping your site, you can see that your site IP is reflecting that of Cloudflare.
The below screenshot will show the TTFB results. I had to wait around 24 hours before the changes took effect. Generally, the transfer from your hosting account to that of Cloudflare is without any downtime
Now the Amsterdam TTFB was around 753.5 ms. After enabling Cloudflare on my site the time has reduced, compared to the previous results. But when I check other location results like NewYork, Dallas, Seattle etc. the TTFB times have increased.
I did this test several times to check for fluctuations.
KeyCDN Performance Test – TTFB Results Conclusion
From the above result we can infer that enabling Cloudflare alone on your site will not decrease TTFB time. On the contrary it has increased for some locations. This is to the contrary belief that Cloudflare will reduce TTFB times.
How to Optimize Website Performance for Speed
According to KeyCDN recommendation, the following are the key factors to improve web performance of your site.
- Time to First Byte (TTFB)
- Critical Path
- DNS
- Render Blocking Resources
- Number of HTTP Requests
- Latency
- Large Image Sizes
- 301 Redirects
To see the relevance of your website speed you need to consider TTFB, DNS, Latency, Number of HTTP requests etc .
Important Conclusion after using Cloudflare
The above report also shows other metric data like DNS, Connect, TLS alongwith TTFB times. After using Cloudflare Free version, the DNS timings have drastically reduced from all the 14 locations. For Paris, it has reduced from 255ms to 31ms.
The Connect metrics were green for all the servers after using Cloudflare. For Singapore, the connect time was 239ms without using Cloudflare. After using the CDN, it has come down to 2ms. The TLS timings have also come down from hundreds to tens in ms, after using Cloudflare.