|
|
|
|
|
by iSnow
3366 days ago
|
|
I don't know, man. The average web page size is now around 2.5MB [1], jQuery is <1% of that. I am not going to be less productive to shave off 1% of total page size. If that means that some random satellite user has to wait 101s instead of 100, so be it. To me, that's much ado about nothing. jQuery is also not doing a whole lot on startup, its functions get called when needed. Lodash is the same. [1] http://httparchive.org/compare.php?&r1=Nov%2015%202010&s1=Al... |
|
2.5MB is absolutely ridiculous. Regardless, you just created a straw-man. jQuery is, what, 26kb minified + gzipped? So you could also say that if website is 100kb then jQuery is 25% the size of your website.
Now 26kb is not much at all but small things add up very quickly. If you're not using it, don't include it. If you can write a tiny bit of extra code to avoid a dependency that isn't highly specialized (e.g. moment.js) it's usually a good idea on the web.
> If that means that some random satellite user has to wait 101s instead of 100
FYI satellite connection issues are more about latency than bandwidth. Adding an extra connection (if it's not concatenated) to fetch jQuery can easily add more than 1 second even though it's only 26kb. Also, I sure hope your app doesn't take 100 seconds to start-up :)