Merging and minifying files is a great practice if you are optimizing your WordPress website for speed, but it should be avoided on an HTTP 2 server. In this article, we're going to discuss what HTTP 2 is, why it is really good for WordPress performance, and why you don't want to merge and minify files if you're using this new technology.
At least, it works very well for an HTTP1.1 based website. Now, with HTTT2, this practice will actually slow down your performance. Here's why.
When loading a website from an HTTP1.1 server, A single request is processed at a single time period. therefore, the browser will first download the CSS, then another CSS, then another JS, then an image, and then the page will be rendered. This happens one after another, until all assets are loaded on the page. If you check a waterfall chart for this type of website loading, you will see that one request ends, and another one begins.
That's why the conventional wisdom is that merging all of these requests into a single larger request is true, and will speed up the loading time of your website. And this is absolutely true. A single HTTP request on an HTTP 1.1 based server will always load quicker then multiple, as there is no waiting period.
With HTTP 2, All requests are loaded simultaneously. There is no waiting process, and there are the same number of connections for the number of assets being requested. Therefore, merging and minifying will simply create a larger file, taking a longer time to upload and download, leading to a longer render process for the website. By keeping all of your individual files unmerged and minified on WordPress, they can all load at the same time, and each upload and download is for a smaller file, resulting in a quicker loading time.
HTTP2 is much quicker, So if you are considering moving hosts or upgrading your website performance speed, definitely look and see if they support this method of data transfer. Our recommended host, Rocket.net, which is where this website is hosted, supports HTTP 2, so it's a good place to start your search.
IsoGroup- Web Dev/Design, WordPress and More