Cloudflare affecting page rendering


(Mafth) #1

This is extension of: Site does not load, besides first background paint

So, it seemed that I fixed the issue, meanwhile - I did not
My site does not load apart first paint time.

I thinks, it’s something wrong with Cloudflare CDN and caching.
Every Chrome (and Chromium based sites) manage to connect to the site and display screenshot above & Edge displays “Error Code: 0x80704006”.

Please help, I’m not really sure how to troubleshoot this.

Site GUI logs (https://example.com/logs) - nothing unusual

Visiting plain IP address of server (or disabling CDN of Cloudflare) fixes everything.
Should I write Cloudflare support?


#2

please do a search here on meta about cloudflare. you’ll find opinions and also solutions!


(Mafth) #3

I only found two topics, what should I look for, exactly?


(Stephen) #4

To prove whether Cloudflare is the culprit please uncheck the orange cloud on the DNS entry for your discourse install.


(Mafth) #5

I’ve done that.
Problem persists, I declared it in the og. post.


(Stephen) #6

Create a new rule at Cloudflare for the fqdn of your install as follows:

image

Catching will still work but all the other optimizations will be disabled.

Did you add the Cloudflare template to your app.yml?


#7

I’ve noted that this issue in particular is due to the Rocket Loading feature. This can be disabled under the Speed category in the dashboard.

At some point my forum went through the same issues, the background would load, or you could see the forum if you weren’t logged in. Making sure that Railgun and Rocket Loader is disabled is a good start, or you can also disable all performance altogether via rules like @Stephen mentioned above.


(Stephen) #8

That does it domain-wide, which is overkill. All applications on the same domain would have the features shut off, all you need is the rule. Discourse doesn’t require further minification or anything which interferes with the way the page is rendered.


#9

I did actually forget about that up until the point where I saw your post. That is a much better solution then disabling it on the entire domain.