Using CloudFlare with FoxyCart

CloudFlare is a popular option for many of our users, and offers fantastic (and easy) protection for most website owners. That said, they do a lot of “interesting” things to speed up the internet. Generally, these things are wonderful, and work well. But what they do (particularly with regard to how they modify website's source, especially as it relates to JavaScript) is incredibly complicated, and we've seen it cause problems.

Unfortunately, sometimes these problems appear out of the blue, without any changes to a CloudFlare or Foxy account. (This is understandable, as CloudFlare is constantly improving their service. But obviously is concerning if you're relying on your website to “just work, all the time”.)

For that reason, we've compiled a list of possible issues and resolutions you may experience with CloudFlare.

Turn Off HTTP Proxy for Your Foxy Subdomain

If you're using a custom subdomain for your Foxy store, we recommend turning off the HTTP Proxy / CDN functionality. Do this in your DNS settings in CloudFlare. It should be the gray option, not the orange option, in the screenshot below: CloudFlare DNS Settings

That will ensure CloudFlare doesn't do it's “magic” on your Foxy checkout. Not that their magic isn't cool, but we've seen it cause problems.

Turn Off Rocket Loader

CloudFlare has a feature in the “Performance” page of their dashboard called “Rocket Loader”. We recommend one of the following:

  • Turning this off entirely.
  • Reading up on it and handling it manually.
  • Leaving it on, but adding the data-cfasync=“false” attribute on the loader.js include on your Foxy site, if it's not present already. More details in CloudFlare's documentation.

If you do use Rocket Loader, please keep an eye on it, and let us know if you encounter any issues (as we're very interested in when and why this might cause problems). Note that Rocket Loader doesn't always cause problems. In our testing, it can work with Foxy without any problems. But… we have also seen it cause problems in “real world” usage for our users.

Site Tools