General

Prevent CloudFlare from Loading a js or Script

Updated January 2026 6,864 views 1 min read
General | Updated January 2026

Cloudflare's Rocket Loader feature automatically optimizes JavaScript loading on your site. However, it can sometimes break interactive elements, sliders, forms, or third-party scripts. Here is how to disable it.

Fix

Disable Rocket Loader in Cloudflare

Log into your Cloudflare dashboard > Speed > Optimization > Rocket Loader > toggle Off. If you only want to exclude specific scripts, add data-cfasync="false" to those script tags instead of disabling it entirely.

01. Exclude Specific Scripts

If Rocket Loader helps performance but breaks one script, exclude just that script:

<script data-cfasync="false" src="/js/critical-script.js"></script>

The data-cfasync="false" attribute tells Cloudflare to leave that script alone while still optimizing everything else.

For Cloudflare setup and configuration, see Cloudflare for WordPress. For general speed optimization, see Speed Up Your Website.

Site Breaking With Cloudflare?

Open a Support Ticket

Quick Recap

  1. Disable Rocket Loader in Cloudflare > Speed > Optimization
  2. Or exclude specific scripts with data-cfasync="false"
  3. Rocket Loader can break sliders, forms, and third-party JS
  4. Test without it first to see if it is the cause
  5. Other Cloudflare features (caching, CDN, SSL) are independent

Cloudflare configuration · Last updated March 2026 · Browse all General articles

Share: X in Reddit f Email
  • 122 Users Found This Useful

Was this answer helpful?

Related Articles

Is it possible to make a cron to backup my database at specific times?

Hosting Control Panel | Updated March 2026 Yes, you can schedule automatic database backups...

Do you support TeamSpeak?

Not Supported | 2026 Not Available on Shared Hosting TeamSpeak requires a persistent...

How do I hide my domain WHOIS information?

General | Updated January 2026 When you register a domain name, your contact information...

https:// with Weebly

Obsolete | 2026 This Article Is Outdated Weebly was acquired by Square in 2018 and is...

SSL - Creating a CSR in Windows 2003

Obsolete Technology | 2026 This Guide Is Outdated Windows Server 2003 reached end-of-life...



Save 30% on web hosting - Use coupon code Hosting30