Prevent CloudFlare from Loading a js or Script

Sometimes CloudFlare / Rocket Loader can have problems with a script and hose it up. To have CloudFlare ignore a script try using the following flag which often resolves the issue:




Where as data-cfasync="false" is what you add to the script line.

Rocket Loader will still work for all other scripts.

Notes:

1. Adding this attribute within JS will not work to exclude the script from Rocket Loader.
2. The 'data-cfasync' attribute must be added before the 'src' attribute.
3. Rocket loader will recognize the tag when either single or double quotes are placed around the attribute value.


  • 122 Users Found This Useful

Was this answer helpful?

Related Articles

Troubleshooting Cloudflare errors

You may encounter errors using CloudFlare from time to time. This article may help to resolve...

Error 508 / 503 - Resource Limit Reached

To help maintain the stability of servers and keep websites fast, UltraWebHosting has resource...

html or htm parsed as shtml not working

To parse .html or .htm files as .shtml add the following to your .htaccess file in the...

Why can users behind proxies not see my site?

If you have enabled hot link protection users behind proxies may not be able to see your site...

How do I parse html files as shtml?

Create an .htaccess file in the directory needed and add the following: AddHandler...