Understand how Rocker Loader can improve page load time.
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.
- Time to First Paint (TTFP)
- Time to First Contentful Paint (TTFCP)
- Time to First Meaningful Paint (TTFMP)
- Document Load
Access Rocket Loader
To access Rocket Loader in the Cloudflare Dashboard:
- Log into the Cloudflare dashboard.
- Select your account and website.
- Go to Speed > Optimization.
- Scroll down until you find Rocket Loader.
You can have Rocket Loader ignore individual scripts by adding the data-cfasync="false" attribute to the relevant script tag, for example:
Rocket Loader will still optimise the loading of all other scripts on the page.
- The 'data-cfasync' attribute must be added before the 'src' attribute.
- Rocket Loader will recognise the tag when either single or double quotes are placed around the attribute value.
If Rocket Loader is only impacting a specific page, then consider using a Page Rule to exclude that page by URL from optional performance features.