: With HTTP/1, the answer is yes. As mentioned by Michael Hampton, combining files (which prefer I call "concatenation") is a typical web site performance optimization. This is due to overhead
With HTTP/1, the answer is yes.
As mentioned by Michael Hampton, combining files (which prefer I call "concatenation") is a typical web site performance optimization. This is due to overhead related to requesting new resources. Every time the browser wants a new resource (a new file), it has to open a new connection to the server.
HTTP/2, however, changes how browsers interact with servers. Instead of one resource per connection, we can have multiple resources on a single connection, so a single file is no longer faster than multiple files.
Of course, HTTP/2 has its own browser support and server support issues. Not all hosting providers offer it yet.
But in the short run, you can also optimize the JavaScript loading. Do you really need all 7KB of JavaScript on every page? Do you really need all 7KB immediately? It could be better to load the most important bit and then use requestAnimationFrame to wait for an idle moment before loading the less-important parts unobtrusively.
More posts by @Vandalay111
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.