Increase the Bubble page load speeds with Cloudflare

It doesn’t help for real Bubble apps. FYI.

1 Like

No, it’s duplicative with what Bubble is already doing which may not have been the case when @Levon was first experimenting. We have seen gains from updating database privacy and using algolia (for RGs).


In the last ticket I opened to support they told me to set it to flexible :thinking:

Yes, flexible is more permissive and will also work; it’s less secure than Full. Full is more restrictive and you’ll need a page rule.

@kramwe just wondering how the database privacy updates helped with the performance? How is that related?

My understanding is it helps in 2 Ways:

  1. It enables faster searches when a user has access to fewer records.
  2. Loading “things” to the page is faster when users only have access to a subset of information on each row (i.e., less data to load)

very interesting, Scott, i’ve somehow overlooked that opportunity for performance improvement! :slight_smile:

1 Like

Doesn’t that rule mean that you are actually deactivating SSL completely when forwarding Cloudflare to Bubble?

What’s the difference then with flexible?

Interesting :thinking:

Someone with more devops expertise should chime in.

Based on this explanation, with flexible, the connection between cloudflare - bubble server is not secure. I don’t know how hackable that is. I assumed it is because cloudflare recommends against it if you have sensitive data. Why not do Full?

I mean yes, Full is the ideal setting. But with your rule I believe you are just implementing flexible.

In the end, you are disabling SSL completely from Cloudflare to Bubble app. It’s the equivalent of Flexible but with rules.

Maybe I’m missing something :frowning:

Also thanks for this @levon :stuck_out_tongue:

1 Like

Hey, I have also enabled cloudflare and i found out that website is going down multiple times. Tried changing the SSL also. Didnt help? I disabled the cloudflare at the end.

Full setting is absolutely ideal!

Bubble uses XHR/AJAX to send and receive most database data that renders in the Web app (although some things are loaded in index.html and the JS of run_js_page(.js)) which basically holds all the static data that defines your app, component settings, static texts, page structure and plugins used.

According to my experience, I do not currently think that the XHR calls gets passed through unencrypted using the flexible setting, but this is surely something to look into if you decide to use the flexible option. If they run a reverse proxy of some kind, this would be risky, I do not think Bubble XHR (Express) server accepts unencrypted connections so I guess unlikely.

I would have a bigger concern about flexible if the Bubble pages that were sent unencrypted were server-side rendered (may happen in the future). (Server side rendered pages would potentially contain sensitive data in the HTML or pure JS files.)

Again, to be on the safe side opt for the FULL setting.

Thank you all — Levon kramwe, and guys from the wonderful project – with your comments I could improve the whole speed thing to a real impressive outcome, I did not even expect when I started optimizing.

1. Cloudflare (caching the files in the network) and as in post said. Also Argo is increasing - again - response times by > 60% at my site.

  1. next to cloudflare, do not forget adding PWA elemnts (caching on the browser side)

The outcome was finally perfect score in Google Lighthouse Tests with almost 100, also on Mobiles.
Then in page rules I did set “cache everything”, for all* pages. I would recommend a thourough test on your app with any adjustments in Cloudflare, with a documentation (I did it in a simple spreadsheet).

For me, there is no disadvantage in using bubble anymore, and I think these caching-optimizations has to be done in any development framework one chose. So it is the work of the “Webmaster” if you have one. In most bubblers corporate situation it is me & you, haha. :sunglasses:


Speed is always a relative measure I have learned, and it is not just “Page Load -fully loaded plus 2 seconds idle” time. It is, what the users experience, especially the “above page fold” UX - not one simple figure. As some wouldn´t believe, checkout amazon´s page loading time, and we can see how worthless this one figure is for sucess or UX. It has to be founfd project by project, testet, and tested again on all settings changes of anything you add or change in Cloudflare or the PWA settings. And then test again. See amazon page laod time finish of 32 seconds and Load 4.13 sec. Slow can mean financial succ

ess, interesting.

1 Like

@levon is this practice/tip still relevant now that Bubble natively works through Cloudflare? I’m trying to speed things up a little more past the standard app architecture side, and wondering if this is an extra thing I can do?

@help Hi Reece, I think it’s irrelevant now


Thanks for clarifying :slight_smile:

Hello, can you confirm it’s still irrelevant ?