Cloudflareinsights slowing my website?

My website has been suffering slow loading time, and one of the real-time user experience tools says this request is taking 1.76s to respond.

https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194

It starts with this…
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,“a”,n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){“use strict”;var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},r.apply(this,arguments)};t.__esModule=!0;var i=n(1),o=n(2),a=n(3),c=n(4);!function(){function e(e){var t="";if(t=window.location.origin?

Does anyone have any idea what I should do? My website is too slow and Google doesn’t like it. I need to speed up…

Sorry I need to add one more thing. I am not sure if this is related or not, but I realize that Cloudflare is taking long time to respond to load some of my “featured images.” (I use wordpress) I have never really figured what the right sizes are for featured images, but does Cloudflare have preferred dimension? It looks like smaller dimensions (like less than 400 x 400) are having problems but I could be wrong. If someone can let me know the right size I will change them. Thanks

In this sentence, nor in the other part of your posts I could not find any evidence that it is Cloudflare that slows down your page. For me so far a wild claim/guess.

But lets look into this and sort things out. What is your domain and with what tool have you analysed it?

A slow response mostly can’t be due to a JS based file. They can cause renderblocking, yes, but not slowing down a response, which mostly is refered to the TTFB of the page. But like I said, with the info you provided it’s hard to say anything.

How should images and their resolution be related to slow “response”? It very sure is not. The dimensions and the filesize do not have anything to do with how fast a server respons when calling the ressource. But it can influence how long it takes to download and then to finish rendering. But the response is not getting influenced by this.

If it was a different value like “First Contentfull Paint” or “Render Blocking” or any other of the Web Vitals please specify.

Thank you for your reply! Sorry I am not savvy enough, so bear with me…I am using a WP plugin called Vikinguard. According to their tool, it’s measuring “request phases start and elapsed time relative to the request start.” and this specific request (below link) is taking 683ms to “connect.” This one is consuming by far the longest time to “connect,” so I wanted to do something.

https://static.cloudflareinsights.com/beacon.min.js/v652eace1692a40cfa3763df669d7439c1639079717194

This is “request headers” if it helps…
Date Wed, 11 May 2022 15:43:08 GMT
Content-Type text/javascript;charset=UTF-8
Connection keep-alive
Access-Control-Allow-Origin *
Cache-Control public, max-age=86400
ETag W/2021.12.0
Last-Modified Thu, 09 Dec 2021 19:55:17 GMT
Cross-Origin-Resource-Policy cross-origin
Expect-CT max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct
Vary Accept-Encoding
Server Cloudflare
CF-RAY 709c074b18cc9575-DUB
Content-Length 13970

Request Headers
Host static.cloudflareinsights.com
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
Accept /
Accept-Language en-US,en;q=0.5
Accept-Encoding gzip, deflate, br
Referer https://www.interactiongreen.com/
Origin https://www.interactiongreen.com
Connection keep-alive

Images I described in the previous comment are taking longer than 400ms to “wait.” My website is image-heavy so I have ton of them, but it looks like only the images that are used as “featured image” are taking long time to “wait.” For this specific thread I didn’t use PageSpeedInsights etc., so I don’t have info about TTFB etc., My apologies for using the word “respond,” maybe it wasn’t appropriate. But according to Viginguard, I think they are contributing to the delay of the start of actual request phase relative to the beginning of the request.

My website is https://www.interactiongreen.com

The biggest hit on your site is the initial response time - so effectively, when your origin actually responds.

The web analytics is added after your origin responds and won’t contribute to this.

If your site is fully static (no dynamic content based on a user’s permissions or logins, etc) then you can also cache the homepage HTML on Cloudflare’s edge which will massively speed up this - since it’s served by Cloudflare, not your origin.

Cloudflare has a plugin for WordPress specifically - https://developers.cloudflare.com/automatic-platform-optimization/get-started/ - but you can also just add a Cache Everything rule with Page Rules https://support.cloudflare.com/hc/en-us/articles/360021023712-Best-Practices-Speed-up-your-Site-with-Custom-Caching-via-Cloudflare-Page-Rules#h_7JfAZiS5qMLcTkUpKvebHJ

The plugin will handle refreshing the cache when you make an update to your site and other stuff like that whereas Cache Everything will wait for expiry or need clearing manually.

1 Like

Wow thank you so much! I had no idea. I just added cache rules using Cloudflare app.

www.interactiongreen.com/*
Cache Level: Cache Everything

This is it, right? Thanks so much! I will monitor the performance. Hope this will make Google Search Console happy!

It will help but it looks like your origin is instructing Cloudflare not to cache the site.

image

The expires header is also being sent and implying that it should expire instantly.

image

OK so I am checking my server…

DNS CHECK FAILED

For Cloudflare to work properly, WWW has to be configured as a CNAME that points to the domain’s Cloudflare address. To do this, add the following lines to your DNS zone:

WWW REDIRECT CHECK FAILED

You think these are the problems? I am checking to fix them now…

OK it was a false alarm. I just contacted my host and he confirmed that my site is configured properly to use Cloudflare. I have WP Rocket on my site. Is it causing conflicts do you think?

Could be this?

Cache Everything isn’t working

The browser cache rules set by WP Rocket in the htaccess file may be preventing Cache Everything from taking effect. Use the Edge TTL setting in Cloudflare to resolve this.

In the referred section: Cache Everything - Treats all content as static and caches all file types beyond the Cloudflare default cached content. Respects cache headers from the origin web server unless Edge Cache TTL is also set in the Page Rule. When combined with an Edge Cache TTL > 0 , Cache Everything removes cookies from the origin web server response.

I don’t have enough knowledge…so should I set Edge Cache TTL >0? (only assuming that I am looking at the correct place)

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