Documentation

Assets Pull: Minify and Concatenate

Prior to HTTP/2 it was best practice to minify and concatenate CSS and JavaScript files to reduce the number of HTTP requests. Due to the multiplexing nature of HTTP/2, concatenation is generally no longer necessary and is not likely to improve page load times.

Minification is still a best practice and can reduce file sizes by removing unnecessary or redundant data, such as spaces and line breaks from your assets. Out-of-the-box WordPress automatically loads minified versions of both CSS and JavaScript files, as do the majority of plugins and themes when SCRIPT_DEBUG is disabled.

If you are using a CDN distribution with HTTP/2 enabled, we do not recommend that you concatenate your CSS and JavaScript files. However, if you wish to do so, any plugin that hooks into the WordPress enqueue system should work. We’ve tested Fast Velocity Minify, which is compatible with WP Offload Media.