For a web page to appear in your browser, it has to first load the HTML, then the CSS. At this point the JS and other resources such as images can also load.
Script ordering for WordPress to optimize this forced loading process
The goal is to shorten the critical rendering path. That is, ensure the content at the top of the page that you see upon loading, is loaded in first, before anything ‘below the fold’.
Your best friend to accomplish this is with your optimization plugin. For OpenLiteSpeed web servers this will be LS Cache, the best option out there for granular control. For others, this could be W3 Total Cache, WP Rocket, WP Fastest Cache, and so on.
All of these have the ability to combine and minify scripts – a big help to cut down on the critical render pathway. Some may also give the ability to enable Async on a per-script level for further optimization of the script ordering for WordPress.
Need your site optimized?
We offer optimization services for any WordPress website, and that includes script ordering for WordPress. Each project is customised to fit what is required after an initial audit, and we work with you to achieve the improvements your after – whether that is speed or test scores.