It's probably also worth noting specifically that CloudFlare offers some JS optimization/preloading features: https://www.cloudflare.com/features-optimizer
One is in beta and one is for Pro accounts only.