With http2, relevant javascript files will be increasingly hosted on the same domain anyway and that option would become increasingly relevant.
With http2, relevant javascript files will be increasingly hosted on the same domain anyway and that option would become increasingly relevant.
(You just know it's gonna happen one day under the guise of a free CDN)
With http2, relevant javascript files will be
increasingly hosted on the same domain
Why is that?[0] https://mattwilcox.net/web-development/http2-for-front-end-w...
HTTP/2.0 supports _single connection multiplexing_, which means that domain sharding (splitting into different domains) is a _bad practice_.
If you're serving megabytes of JS such that that is enough to matter... no, it's still true, if that's not sustainable you've got bigger problems than a CDN is going to solve. Even on very JS-heavy sites, the amount of your bandwidth taken up by JS shouldn't be that large on a properly-configured site. (Yes, I can construct some rare exceptions... you've got a demo site for WebGL and your average viewer hits you once with no cache, grabs megabytes of JS and textures, then moves on never to return. But they are rare, even if you can construct them in your head.)