Cloudflare Docs
Speed
Speed
Visit Speed on GitHub
Set theme to dark (⇧+D)

Rocket Loader

Rocket Loader prioritizes your website’s content (text, images, fonts, and more) by deferring the loading of all of your JavaScript until after rendering.

This type of loading (known as asynchronous loading) leads to earlier rendering of your page content. Rocket Loader handles both inline and external scripts, while maintaining order of execution. Cloudflare will detect incompatible browsers and disable Rocket Loader.

On pages with JavaScript, this results in a much faster loading experience for your users and improves the following performance metrics:

  • Time to First Paint (TTFP)
  • Time to First Contentful Paint (TTFCP)
  • Time to First Meaningful Paint (TTFMP)
  • Document Load

​​ How to

​​ Availability

FreeProBusinessEnterprise

Availability

YesYesYesYes

​​ Limitations

Some of Cloudflare’s optional features, including Rocket Loader and Email Obfuscation, use non standard tags that fail strict HTML validation via tools like w3.org. These failures do not correlate to issues for your site visitors.

If you observe JavaScript or jQuery issues for your website, disable Rocket Loader and retest your website.

If you have a Content Security Policy (CSP) in place for your domain, you will need to update your headers to support Rocket Loader.