How to Improve Mobile Page Speed Score from 40 to 50?

Hi! I need to improve the Mobile Page Speed Score of my website (https://www.shopping.tennis/) from around 40 to at least 50 based on PageSpeed Insights. I am already using both SG Optimizer and Cloudfare CDN. Can you tell me what I can do to make my website faster in order to score at least 50?

FYI, all of the following are already activated on SG Optimizer and Cloudflare CDN:

– SG Optimizer: Dynamic Cashing, Automatic Cache Purge, Memcached; Enable HTTPS, Fix Insecure Content, WordPress Heartbeat Optimization (Post & Page Edit: 180s), DNS Pre-fetch for External Domains, Scheduled Database Maintenance; Combine JavaScript Files, Defer Render-blocking JS, Combine CSS Files, Web Fonts Optimization, Remove Query Strings From Static Resources, Disable Emojis; New Images Optimization, Generate WebP Copies of New Images, and Lazy Load Media.

– Cloudflare CDN: Auto Minify (JavaScript, CSS, HTML), Brotli (Speed up page load times for your visitor’s HTTPS traffic by applying Brotli compression), Rocket Loader (Improve the paint time for pages which include JavaScript), Railgun (Accelerate delivery of dynamic content), HTTP/3 (Accelerates HTTP requests by using QUIC, which provides encryption and performance improvements compared to TCP and TLS), 0-RTT Connection Resumption (Improves performance for clients who have previously connected to your website), WebSockets (Allow WebSockets connections to your origin server), Onion Routing (Onion Routing allows routing traffic from legitimate users on the Tor network through Cloudflare’s onion services rather than exit nodes, thereby improving privacy of the users and enabling more fine-grained protection), IP Geolocation (Include the country code of the visitor location with all requests to your website)

The only thing I have not activated yet on Cloudflare CDN is ‘Automatic Platform Optimization’ (which improves the performance of WordPress websites by serving them from Cloudflare’s edge network). Would that do the trick?

Thanks, in advance.

Have you checked the DevTools console in your browser? (Try F12 or right-click > inspect > change to network tab > reload the page) Do this in a private browser window so you’re not getting the logged-in version of your site. There are some strange errors in the console.

These 2 fonts are failing to load and timing out (adding 300ms each to load time) because the links are missing the / after tennis:

https://www.shopping.tenniswp-content/themes/urus/assets/fonts/Urus.ttf?5fdq4q
https://www.shopping.tenniswp-content/themes/urus/assets/3rd-party/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0

Next, the request to fonts.googleapis.com for roboto font is returning a 400 error, adding another 300ms to load time.

I’m not sure how any of that happened. Maybe a simple mistake somewhere that you’ll need to look for. But other than the missing / in those links, you are “doubling up” on some optimization settings between Siteground and Cloudflare. This causes conflicts.

For example, if Cloudflare is minifying your CSS/HTML/JavaScript, you don’t need Siteground doing the same thing. Choose either Siteground or Cloudflare to perform each optimization. I would disable Rocket Loader in any case, and see if that helps to start.

You really need to be aware of what each setting on each platform is doing, and not just activating everything everywhere.

SG Optimizer doesn’t seem to be removing query strings from static resources even though you say it’s activated. Maybe that’s also part of the conflict.

WooCommerce Cart Fragments AJAX (wc-ajax=get_refreshed_fragments) takes a full 2 seconds to load. If you disable it, that should get you from 40 to 50 without doing anything else… but you should fix these other errors/conflicts too. If you search about that cart fragments AJAX you can find out how to disable it.

There are at least 2 calls to YouTube APIs (adding another 300ms to load time) and I don’t see any use for them. Is there supposed to be a YouTube video on the front page? If not, don’t waste time connecting to YouTube.

Connections to your origin server are fairly slow too. When a file request gets a ‘miss’ on Cloudflare cache, it has to connect to your host, and this is wasting a lot of time. You’re hosted at SiteGround?

Anyway, my advice for the first steps:

  • Disable Cloudflare Rocket Loader.
  • Disable SiteGround Combine JavaScript Files.
  • Disable SiteGround Combine CSS Files.
  • Clear cache on Cloudflare and any other cache you’re using.
  • Test on PageSpeed Insights and check DevTools in your browser again.

After you have done the above tests, keep track of the change in score / error messages, and then run some tests with Railgun disabled. I don’t know much about Railgun and don’t use it, but you can always turn it back on later.

2 Likes

Hi! Thanks a lot for your web diagnostics and great tips. I really appreciate it. I will fix the font URLs by adding the missing slashes right after ‘tennis’. I will also try to get the request for the Roboto font fixed. And you are right that I may be duplicating some optimization settings between SiteGround and Cloudflare.

However, I am minimizing CSS, HTML, and JavaScript only on Cloudflare (not on SiteGround). I just double-checked and they are not activated on SiteGround. The settings that are actually activated in the Frontend Optimization section of SiteGround are ‘Combine JavaScript Files’, ‘Combine CSS File’, ‘Defer Render-blocking JS’, ’ Web Fonts Optimization’, and ’ Remove Query Strings From Static Resources’. Should I deactivate the first two?

Thanks for also pointing out the need to disable Cloudflare’s ‘Rocket Loader’ and ‘WooCommerce Cart Fragments AJAX’, as well as the need to eliminate those two calls to YouTube APIs (as there is no need for any video on the home page of www.shopping.tennis).

Thanks, again, for your great help and tips.

Best regards,
Kam

Hi! Thanks a lot for your web diagnostics and great tips. I really appreciate it. I will fix the font URLs by adding the missing slashes right after ‘tennis’. I will also try to get the request to fonts.googleapis.com for the Roboto font fixed. And you are right that I may be duplicating some optimization settings between SiteGround and Cloudflare.

However, I am minimizing CSS, HTML, and JavaScript only on Cloudflare (not on SiteGround). I just double-checked and they are not activated on SiteGround. The settings that are actually activated in the Frontend Optimization section of SiteGround are ‘Combine JavaScript Files’, ‘Combine CSS File’, ‘Defer Render-blocking JS’, ’ Web Fonts Optimization’, and ’ Remove Query Strings From Static Resources’. Should I deactivate the first two?

Thanks for also pointing out the need to disable Cloudflare’s ‘Rocket Loader’ and ‘WooCommerce Cart Fragments AJAX’, as well as the need to eliminate those two calls to YouTube APIs (as there is no need for any video on the home page of www.shopping.tennis).

Thanks, again, for your great help and tips.

Best regards,
Kam

Hi @kamret, here are some other great tutorials on performance to take a look at, Performance Tutorials - Google PageSpeed & Webpagetest.org. While Support can assist with Rocket Loader and our performance tools, they cannot troubleshoot general performance issues with your site, but that post links to a couple of resources that are really worth checking out. Check them out let us know how you’re progressing/additional questions. I noticed your tickets with Support and see they’ve been merged to align with your posts here. (btw, let us know if you were able to resolve Forward slashes after domain name missing in URLs - #3 by kamret with your hosting provider.)

2 Likes

Hi Cloonan,

Thanks for your reply and the tips. I followed the advice of another person on Cloudflare Community (Profile - trichstir - Cloudflare Community) who suggested that I do the following to make my low mobile page speed score (35) get higher: 1) disable ‘Rocket Loader’ on Cloudflare, 2) disable ‘Combine Javascript Files’ on SiteGround Optimizer, and 3) disable ‘Combine CSS Files’ on SG Optimizer. Unfortunately, after disabling all that, the website (www.shopping.tennis) got even slower than before with a mobile page speed score of around 30.

As for the forward slash (/) that disappeared right after the domain name (shopping.tennis) in all the URLs, unfortunately, there was no solution and I am having to add the slash again in all the URLs (one by one) on my website, which is very time-consuming. I believe this happened after I activated some features from Cloudflare CDN.

According to an article/blog I read (Using the Velvet Blues Update URLs WordPress Plugin | Web Hosting Hub), this is a common issue (i.e., broken internal text & image links) after moving WordPress from one location to another.

Thanks.

Regards,
Kam

Cloudflare does not alter any content on your server.

For future reference, if something in your WordPress database gets out of whack like that, your host hopefully has wp-cli installed, and you can make mass database changes with its search-replace function (do a --dry-run first)

1 Like

Hi,

Isn’t yours a WordPress site? Add one by one? I wonder how are you doing this. This should work out of he box if you have the right permalink structure. Have you tried to verify your permalink structure on the WordPress dashboard > Settings > Permalinks? Sometimes just by visiting this page and hitting the save button fixes temporary issues that may arise for many different reasons.

As far as optimization goes, your site is not too bad. I ran it on webpagetest.org a couple of times and pages are loading at ~3.5 sec first time, down to ~1.6 sec second time (cached assets).

Now PSI is kind of hard to please, especially when it comes to the myriad external resources a site loads, assets that you cannot use Cloudflare (or Siteground or WordPress etc for that matter) to optimize. I noticed for instance a YouTube widget loaded on the home page, but that page has no video on it! Is some plugin loading YT on all pages “just to make it faster in case the page has a video”? That would be a no-no.

My advice is that you do some auditing of the plugins you have installed on your WordPress, make sure to understand what they do, what assets they load onto your pages etc. Try to read the textual messages on the PSI report, see what they consider the worse elements, and try to identify which plugin is adding them to your page. Also, there’s a plugin called Clearfy which you can use to remove stuff WordPress add to your site without you knowing, some of which have performance impact, others, security implications. (BTW, the webpagetest.org report gives your site an F in Security, you may want to check their advice, pretty easy to fix.)

1 Like

Hi! Thanks a lot for your reply and feedback. I really appreciate your valuable advice. I did try to resolve the URL issue (missing forward slash) through WordPress dashboard > Settings > Permalinks but it did not work.

I will ask the WP theme developer to remove the YT widget from the home page, as well as from other pages where it was placed. Thanks for letting me know about the Clearfy plugin and the F in security for my website from westpagetest.org. I will try to fix those issues ASAP. Thanks, again, for your valuable advice.

1 Like

Hi! I am trying to increase the mobile page speed score of my website (www.shopping.tennis) from around 35 to 50 and would be grateful if anyone could help as the Cloudflare support team has not reverted to me yet after 3 days. I have already answered a lot of their questions (including some files that I sent them) and those questions & answers, as well as the relevant web diagnostics files they requested, can all be accessed through the following links:

Thanks, in advance.

Regards,
Kam

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.