Optimizing web to get better score in Google PageSpeed Insights

I’m optimizing a Wordpress website to get better score in Google PageSpeed Insights. Website has about 10000 visits/per day.

For now I’m using a free Cloudflare account with “cache everything” option on.

My question is what services can improve response time and overall performance spending maximum 15 - 20 euros by month at Cloudflare? So I can get better score at Google PageSpeed Insights.

Possible candidates: Argo, Load Balancing, something more?

Thank you!

1 Like

PageSpeed Insights is not the best tool to assess the overall speed of a site on Cloudflare. Cloudflare caches your files on any one of its 170+ datacenters around the word. It will only cache a file after it’s been requested, so the first visitor in any given datacenter will have to wait CF get the file on the origin server before it will return it to the user. PageSpeed will test your site from different servers each time, and it could be hitting a different CF datacenter when you redo the test, hence always getting files that have not yet been cached by Cloudflare. Also, PSI does not let you see whether or not the files it gets where cached by CF, which makes comparison difficult. Try using other tools such as webpagespeed.org, pingdom.com or gtmetrix.com. Or you can use Chrome’s built in PageSpeed auditing tool.

Rocket Loader will speed the loading of JS and its dependent files, such as images. But it depends on your website configuration, plugins etc. I’d suggest you do a search on this Community for “wordpress” and browse some recent discussions of it.

I don’t have experience with Argo yet, but in the past few weeks have been receiving promo emails from Cloudflare a/b testing the speed of my 2 WordPress sites with/without Argo, and the speed gain seems substantial.

2 Likes

Thx for your answer!

I will test Cloudflare performance on websites you said. But still I need improve PageSpeed Inside score for SEO purpose.

I’ve already tried Rocket and it brokes some javascript on a website.

Yes, maybe I will try Agro.

1 Like

If you provide your domain and some specifics about its configuration, like what plugins you are using for caching, SEO, and image optimization, it will increase chances people in this Community will be able to help you further. Also, you should inform whether or not you are running the official Cloudflare WordPress plugin. Though not mandatory, it can help you with HTTP/2 server push, a tool that can have a substantial effect on speed.

https://support.cloudflare.com/hc/en-us/articles/115002816808-How-do-I-enable-HTTP-2-Server-Push-in-WordPress

If you are on a Pro Plan, you should try Polish and Mirage, but the results will vary depending on your WordPress setup.

Website: https://barcelonatm.ru

Yes, I use original Cloudflare plugin.

Plugins used for performance:
Autoptimize
WP Super Cache
Imagify
a3 Lazy Load

1 Like

Though you said you have a cache everything page rule on, it doesn’t look like your generated HTML pages are being cached. On your home page, even after repeatedly refreshing it, I get a header

cf-cache-status: EXPIRED

In other pages I don’t get the cf-cache-status header at all. Please read the following instructions on how to set up cache everything, specially the part about setting Edge Cache TTL to override some origin server cache headers. Please test before deploying, as a cache everything rule may end up caching private information on logged in users, including admins.

https://support.cloudflare.com/hc/en-us/articles/115000150272-How-do-I-use-Cache-Everything-with-Cloudflare-

It’s strange because I see next (almost all traffic is cached):

And I have only two page rules:

And on homepage:
image

Maybe I had developer mode on when you visited the website.

Cloudflare caches by default most of the heavier, static files on a typical WordPress installation, such as images, JS and CSS files. So even without a cache everything page rule you’d still see the majority of your traffic being cached.

I’m still getting that response re: caching headers from CF.

Your page rules need to
1 Include a wildcard * at the end of the, like example.com/* and add a Edge Cache TTL setting
2 Create another page rule to exclude /wp-admin area to avoid caching it:

/wp-admin*
Cache Level: Bypass
Disable apps
Disable performance

3 Place the /wp-admin* rule as the first rule, so that it will trigger first

1 Like

You’re right! Thank you a lot!

It was just caching totally the homepage…

Now I have next settings:

Great!

Now you can save the first page rule by turning Always Use HTTPS for the whole zone on the SSL/TLS app of the Clouflare Dashboard.

Then you can use the first rule to redirect to canonical, from www to naked domain, with a 301 redirect using Forwarding URL setting.

Nice! Will do that!

Do you get 403 Forbidden when you are trying to access some frontend pages when you are logged in?
image

But I have no error when I’m using Incognito mode.

This looks like a browser cache issue. Flush the cache and log in again to your site, see if it solves the problem.

1 Like

PageSpeed insights is getting antiquated. You’re better off with Lighthouse overview - Chrome Developers and Optimize your mobile site or app - Think with Google

1 Like

Google PageSpeed Insights v5 now factors in Google Lighthouse metrics which is why folks are seeing lower scores than with Insights v4 :wink:

Google PageSpeed Insights v5 is heavily weighted towards interactive and speedindex and first contentful paint metrics on 3G moto g4/nexus 5 device emulation. So for dynamic and javascript heavy sites, 3G mobile score or heavily render blocked asset based sites, the score will be lower. From v5 API this is the weighting used to determine the score

  • interactive 5
  • speed-index 4
  • first-contentful-paint 3
  • first-cpu-idle 2
  • first-meaningful-paint 1

You really shouldn’t look at the overall scores but the metric’s values measured over time to get your relative page speed. Field data origin summary would be that over time measurement rather than the lab data scores which is what the score rating is measured from.

My write up on PageSpeed Insights v5 update at https://community.centminmod.com/threads/google-pagespeed-insights-v5-update.16016/

For pagespeed tests, also use webpagetest.org for pagespeed testing - my guide at https://community.centminmod.com/threads/how-to-use-webpagetest-org-for-page-load-speed-testing.13859/

3 Likes

Yes, it solves it, but it always happens when you make cache MISS and you’re logged in. Is there a way to avoid that?

Do you use the third free rule? For what if it’s not a secret?

It worth to get agro with free plan or it is bettter to PRO plan for 20 euros?. Do you konw if Cloudflare servers give more preference to requests for PRO/Premium plans content vs free plans?

Also I see PRO plan has “Mobile optimization with Mirage™”.

I don’t know. This seem to be some configuration issue at your origin server. Check your .htaccess file and similar configuration files for possible directives that may be causing the 403s.

I answer that in a msg above. I use it to make a canonical redirect from www to naked domain.

You’d have to test and see what works best for your site, as each site will benefit more or less from the same features. First read the Argo documentation, enable it and let ir run for a month. Then disable it and get the Pro Plan for another month. Compare.

Don’t forget to come back to tell us the results. :slight_smile:

Hi @alligator1986,

Your post caught my attention because I am using the exact same plugins for performance.

But I decided to stop using Cloudflare.

And this was after a lot of discussion with my developer, comparing functions and being confident that the hosting provider security was top. And because mainly all my clients are local in NZ, I didn’t see the need anymore for Cloudflare. And guess what? Speed did improve. And I’ve not looked back. We do life insurance, hamilton, waikato and using cdn networks was a nice to have, but certainly not necessary.

No regrets :slight_smile:

2 Likes

Thx for for info!

Finally I’ve got a PRO plan. I have 20 page rules. But I only use 4 rules :slight_smile:

I have Polish function:

And Mirage:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.