• In theme development, what’s the best practice for enqueueing scripts individually vs concatenating scripts into one file to avoid multiple HTTP requests? Enqueueing the scripts individually does allow for them to be dequeued if necessary, but at the cost of larger file size and more HTTP requests. Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If it’s a concern, the best thing to do is suggest that users install a pluign like Autoptimize that will do the concatination for the entire system, not just the theme. That way you can enqueue, dequeue and more as much as needed, and the concatination and minification will still occur.

    Thread Starter Jason Yingling

    (@yingling017)

    Nice, I’ll check out that tool. I have been playing around with using CloudFlare for minifying resources among other things, but I’m still hitting a good amount of HTTP requests on page speed analysis.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Enqueueing JS scripts separately vs concatenating?’ is closed to new replies.