Why should you not concatenate with HTTP/2?

Hi there! I had a question about this warning on your page about Google SEO optimization. I have both Autoptimize and W3 Cache installed. Which settings would I need to change in those to make sure I’m not concatenating? Can you further explain in non-tech speak what the problem with HTTP/2 and concatenating is? I read the developer article and didn’t understand it. Thanks for your help!

We advise against concatenating CSS or JavaScript files together or installing applications on your origin web server which perform this function due to HTTP/2 request multiplexing.


1. Don’t Combine Your CSS or JavaScript

You should no longer concatenate, or combine your website resources. In HTTP/1.1, this will reduce the number of HTTP requests, and files needed to be downloaded to display your website.

Each HTTP request will add latency, so in HTTP/1.1 downloading a single file is often more efficient than downloading multiple files. Fewer files also help get around the limit to simultaneous downloads in HTTP/1.1.

As HTTP/2 allows for multiple downloads without multiple server requests, the number of files is less important when optimizing for speed. Combined with caching, specific files are better in HTTP/2.

In effect, more specific files allow you to serve most of your website from your Content Delivery Network (CDN) and the user’s browser cache. It also means the browser won’t have to download and parse a single large file from your server when you make minor tweaks to your website.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.