There are a plethora of techniques that are often used to defer parsing; however, the simple and preferred technique is to simply Defer loading of JavaScript until it is needed. If this technique isn’t appropriate to use on your page, it is next suggested that you use the attribute where appropriate, which prevents parsing from blocking the initial page load by deferring it until the browser’s UI thread is not busy doing something else. All these settings can be applied with Asset CleanUp Pro Nulled Page Speed Booster without writing any code.
Bonus : How to Null Asset CleanUp Pro >>>
Changelog
--------------------------------
1.2.6.7 - 16 Apr 2025
* Optimize JS: If a JS file is loading based on the media query set (e.g. only on mobile view), make sure that any associated inline JS that is printed "after" the main JS file, is triggered only after the main JS file is loading (if the media query matches), and never immediately to avoid JS "undefined" errors in the console and even broken functionality
* Optimize JS: When the WordPress core file "wp-i18n" is unloaded, the SCRIPT tag is replaced with another tag (much ligther) keeping "setLocaleData" and other functions active to avoid JS errors being shown in the console (ideal for websites with just one language)
* Optimize JS: When a JS asset is unloaded and the option 'Ignore dependency rule and keep the "children" loaded' is used, make sure the inline JS associated with the asset is also cleared to avoid any JS errors in the console or even broken page functionality
* Improvement: Detect an attribute found in a tag without using RegEx (for faster PHP processing)
* Fix: When using the "Direct" assets retrieval method, any unloaded plugins for the homepage, would not show up as unloaded in the CSS/JS manager, confusing the admin that the rules might not be applied
* Fix: Avoid errors such as the following (in case plugin functions are called too early by external code): 'Asset CleanUp's object cache is not valid (from method "WpAssetCleanUp\ObjectCache::wpacu_cache_get").'