Script loaders vs wp_enqueue_script

  • If this is for your personal blog only, then just use a plugin that minifies and concatenates JS.

  • If it’s for a theme you’re building, then if the scripts are custom, or small & unlikely to be used by other plugins, merge them all into a single .js file, and load it in the footer.

    A more hardcore method would be to pick up registered scripts from the $wp_scripts global, unregister them all, and concatenate them into one file (or load them with headjs, whatever way you want to go). Here are some ideas if you go this way…