How Do I Host Static Files Using CloudFlare CDN?

I am having speed issues with my websites, so I would like to host my static CSS and JS files on a CDN so that my dynamic pages can load them from CDNs instead of the server’s file system. How do I accomplish this with CloudFlare?

I created an account and setup a workers subdomain on the workers.dev site but see no option for uploading files. I don’t want to have to give CloudFlare access to my DNS either because CloudFlare has proven untrustworthy over the years when it comes to edgy content that pushes the boundaries of free speech (ex: pulling the plug on 8Chan). I don’t want CloudFlare in a position where they could take my sites down, but I don’t mind hosting javascript and CSS with them that the sites could technically function without.

You could use cloudflare worker sites or the beta product cloudflare pages.

1 Like

Without much effort, you could use the cache everything feature.

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