
7/4/2018 · Peter Belesis, Ivan Nikulin
What this post added
This post details the re-engineering of Cloudflare's Rocket Loader product. It explains the historical context of JavaScript blocking page rendering, the evolution of solutions including previous versions of Rocket Loader, and the shortcomings of the old implementation (CSP/SRI non-compliance, XSS persistence, mobile incompatibility). The new architecture is described, focusing on executing blocking scripts after page load. The server-side component uses CF-HTML to rewrite script tags with a nonce, and the client-side component manages script loading and execution in two passes to simulate browser behavior, handling different script types (inline, external blocking, defer, async) manually. The goal is to improve perceived page load metrics and user engagement by unblocking page parsing.