Here are some reasons why you don’t need to merge resource files on HTTP/2:
- Multiplexing: One of the key features of HTTP/2 is multiplexing, which allows multiple requests to be sent and received on a single connection simultaneously. This means that the browser can request multiple resource files at once without waiting for a response. As a result, the number of requests is no longer a bottleneck for performance.
- Server push: Another feature of HTTP/2 is server push, which allows the server to send resources to the browser before the browser requests them. This can further reduce the number of requests and improve performance. However, server push should be used with caution as it can also hurt performance if not implemented correctly.
- Caching: HTTP/2 also improves caching by allowing the browser to cache individual resources instead of the entire file. This means that if a single resource changes, the browser can still use the cached version of the other resources, which can improve performance and reduce the amount of data transferred.
Merging resource files on HTTP/2 is no longer necessary and can actually hurt page speed. Instead, focus on optimizing each resource file individually and take advantage of the new features of HTTP/2 such as multiplexing, stream prioritization, and server push. By doing so, you can improve the performance of your web application and provide a better user experience for your users.