browserify-handbook
browserify-handbook copied to clipboard
soften language for d/l time saved, + GZip note
https://github.com/substack/browserify-handbook#window-globals
This approach tends to be very slow since each script tag initiates a new round-trip http request... loads much faster because only a single http request for a single script tag needs to execute
Honestly, I think improved speed depends on the resources needed for the app & loading order. A few external resources hosted on a CDN or separate server (with unique originating URL) could load concurrently, thanks to most browsers having spare Max Connections. A browserified/concocted chunk may have to wait for open HTTP connection, since "Connections per Hostname" has a smaller cap. True, an extra HTTP lookup is needed, but lookup time can be reduced, & IP &/or file may be cached already.| I did note the extra GZip reduction. But even at best 10 browserified files may save 10 HTTP packets, likely 5, so a few Kilobytes? Since there are so many variables, I softened the language of the impact.
I'm willing to see some hard proofs either way.
It's more about latency because on lousy conections like 3g each round-trip can be really costly.
Also, loading tons of script tags on a resource limited set-top-box can be a nightmare.