Mobile app version of vmapp.org
Login or Join
Vandalay111

: 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

@Vandalay111

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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme