Reduce Unused JavaScript

Unused JavaScript can slow down your page load speed. If the JavaScript is render-blocking, the browser must download, parse, compile, and evaluate the script before it can proceed with all the other work that's needed for rendering the page. Even if the JavaScript is asynchronous, the code competes for bandwidth with other resources while it's downloading, which has significant performance implications. Sending unused code over the network is also wasteful for mobile users who don't have unlimited data plans.

It's difficult for an extension like JCH Optimize that runs on the server to determine which JavaScript is used in the browser or not so to achieve a similar effect to removing unused JavaScript, the component then 'lazy-loads' the loading of the scripts so at least the initial page load speed can be improved. The Reduce Unused JavaScript feature defers the loading of scripts on the page until the user starts interacting with the page. If there are JavaScript files containing codes that are critical for the initial render of the page, particularly the section above the fold, then these critical scripts can be excluded. They will then be loaded asynchronously but preloaded to load them early.