Make the insights beacon.js load from a first party domain

When web analytics is enabled, Cloudflare embeds a call to this JS file

I would like to feature request that this script gets loaded on our domain as a first party request.

(Similar to how rocket loader will load from {mydomain}/cdn-cgi/scripts/*/Cloudflare-static/rocket-loader.min.js)

this would avoid the browser from having to accommodate requests to the 3rd party domains, making it load slightly quicker, and simplifying our content security policies.

if feels like a very quick win!


Been working hard to eliminate third party resources, web fonts, etc. I am currently down to only a few third part resources. Beacon, Google Analytics, and google reCaptcha. Would love to see Beacon and possibly Turnstile served from local domain. Presently, load times are:

  • Beacon - 6.88KB - 187 ms
  • reCaptcha (gstatic) - 173KB - 33 ms and (google) - 553B - 143 ms
  • Google Analytics - 83.8KB - 148 ms
    This is with dns-prefetch. 1/3-1/2 the time is spent connecting and SSL.

Locally loaded resource:

  • Rocket-loader - 4.25KB - 25ms
  • invisible.js - 3.78KB 8 ms

Are not hampered by this and would not need the DNS_prefetch.

I hope Cloudflare will consider this.