r/javascript • • Jul 25 '18

jQuery was removed from GitHub.com front end

https://twitter.com/mislav/status/1022058279000842240
557 Upvotes

197 comments sorted by

View all comments

Show parent comments

4

u/dalore Jul 26 '18

Not sure I follow what you're trying to say?

Resources normally start off unbundled. So why would you split a bundle and not just instead not use bundles?

-2

u/13steinj Jul 26 '18

I'm saying even without http2 bundling is not a necessity.

4

u/dalore Jul 26 '18

But it is for performance.

-3

u/13steinj Jul 26 '18

Not if you effectively split up your resources to only fetch what is needed per page.

4

u/Disgruntled__Goat Jul 26 '18

I think you and /u/dalore are talking about two separate things. They are already operating on the assumption that you’re only serving the required JS (for the most part at least).

On http1 it’s still better to serve a bundle containing, say, ScriptA + ScriptB + ScriptC + ScriptD across the whole site than it is to serve scripts A, B and C separately on a page where ScriptD is not required.

Of course there is a balance. Sometimes you have a large script that’s only used in one part of the site, so you wouldn’t include that in the main bundle.

→ More replies (0)

4

u/dalore Jul 26 '18

I don't think you understand. Each request outside of http2 forms a new tcp connection. Tcp uses a slow start algorithm so that means it starts off slow. Those extra slow connections are going to kill performance.

With http2 it doesn't make new tcp connections but bundles the requests in the same tcp connection.

→ More replies (0)