Http link preload rocket loader

when rocket loader is running on a page it’s always going to be in the critical path
as a result it would be really useful if we could have it automatically add the http link preload headers for rocket loader.
unfortunately we don’t know what the the url is going to be upfront, so can’t preload it our selves.
is it in the roadmap soon to have rocket loader apply its own preload link headers to the response it’s being injected into.
I believe this would have a real impact on page performance as the browser could start fetching the critical rocket loader js early.

This is true, the RocketLoader implementation, exactly as the one from ALL other JS-based Cloudflare products are lesser than good, as they don’t even use their own tools, to improve the speed of these functions.

On top of this, if you activate RocketLoader it eventually will or will not break your page, since you do get ALL updated automatically, which you might not want.

The links are, as you said:

  1. changing (with every new commit/version)
  2. not predictable for you

therefore implementing

  1. preload links
<link rel=preload href=/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js as=script>
  1. early link headers
<FilesMatch "index.html">
    Header add Link "</cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js>; rel=preload; type=text/css; as=script"
</FilesMatch>

is connected to way more effort due to the fact that you may preload one version, but another is already delivered by Cloudflare. For Cloudflare, it would be easy to do.
I anyway can not recommend ANY of Cloudflares JS-based functions/products, since they on long term create more problems than they solve.

Also, addressing problems on JS-base should always just be the last option, but that’s another topic :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.