External Scripts not loading only when Cloudflare is activated

Hey guys.
So I have recently launched a site and noticed one asset was not loading, without any console errors showing up.
I cloned the site to a sub-domain and ran a few different tests, and noticed the asset would only load when Cloudflare is disabled (no other variable was different from the original site).

The script in question is a Json file, hosted on a Webflow server (cannot load it locally, it is linked to different other scripts).
Note that all other scripts (like barba.js) are working fine.

Anyone has encountered this before? Any idea how to solve this?
Thanks.

We’d need more to go on than “not loading.” There’s always some sort of response for a request. What’s the URL of that asset?

Hey @sdayman, so this here is the asset in question:
https://uploads-ssl.webflow.com/5d6ce2b50b802064bf33b07c/5d81370c96497440d4a79482_Scroll%20Circle3.json

If you want to take a look at the sites:
Here is the live site: https://www.parabolae.co
And here is the test sub-domain with Cloudflare disabled: https://www.blah.parabolae.co

If you are checking it on the desktop version, look at the bottom left corner of your screen, you’ll notice the missing circle/scroll indicator on the live site.

I see it’s not showing up on the Cloudflare site. The resource loads, but does not seem to execute as expected. Try disabling Rocket Loader from Speed -> Optimization section of the Cloudflare Dashboard.

Didn’t work. I also tried disabling Brotli compression, but still nothing changed. I think I’ll need to contact the support team directly, as this seems like a very weird behavior. Let me know if anything else comes to your mind in any case. And I’ll post the fix if I find it out.

Thanks a lot.

I assume your non-blah site is on the same IP address as the test site, correct? Does it all point to the same web content?

In that case I’d believe this rather is of some sort of CORS issue. The scroll indicator generally does not load on your main site, irrespectively of whether you load it through Cloudflare or not.

I’d also assume it is not the JSON file (which actually seems to load fine in all cases) but rather something JavaScript-esque. Note how the div.scroll-anim element doesnt have any children in one case, whereas it does when the indicator shows up.
I guess something in your JavaScript does not execute, maybe you get somewhere an exception but catch it and dont handle it (hence no output either).

In any case, I am afraid this wouldnt look very Cloudflare related to me.

One thing, though, please disable that mouse cursor tracker. Its level of annoyance goes through the roof :smile:

2 Likes

Hey man, thanks for the detailed reply.

Yes, both sites are on the same IP. The blah one is basically a copy/pasted version of the original (main) site hosted on a subdomain. The only difference between the two is that the main site has Cloudflare activated.

But with what you said, I guess the issue is rooted somewhere else, yet somehow still related to Cloudflare being active, without Cloudflare by itself being the sole culprit (does that make sense?).

No idea what CORS is, I’ll look into that, thank you. (I’m a UI designer with some front-end coding skills btw, so I wouldn’t be surprised if the fix is actually a “silly” basic one).

As for the cursor, yea I’m experimenting with different easing/speeds on the laggy cursor. It wasn’t supposed to lag behind that much haha, I’ll get back to it later, thanks for the feedback tho.

Anyway, I’ll dig deeper into what you suggested.
Thanks again mate!

Not really I am afraid. The circle doesnt show up on your main site regardless of Cloudflare’s status. Usually it should be easy to spot because of some JavaScript exception, however in your case there is absolutely nothing, hence my assumption you might catch them globally and then ignore them and hence no output either.

As you say both sites are identical, it probably is not down to the code itself but rather something about the domain itself or its configuration. CORS -> https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

Personally, I would disable it altogether. These gadgets were a novelty in the 2000s but - to be completely honest - already an annoyance back then. Now in the (almost) 2020s they didnt really age well. Just my two cents :slight_smile:

2 Likes

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