4 ms·
> I'm all for eliminating unnecessary bloat, but it's not as if a jQuery download is a huge amount of data to fetch. While jQuery is not a framework, most front
by BinaryIdiot 11y ago
> I'm all for eliminating unnecessary bloat, but it's not as if a jQuery download is a huge amount of data to fetch. While jQuery is not a framework, most front-end JS frameworks are the same size or bigger and don't receive as much attention for being bloated.
Remember size isn't as much of an issue when it's less than 100kb (though 3G or less networks that will still be painful). The biggest issue is yet another file for the browser to fetch. Synchronously or asynchronously the browser will still open another connection to the server to grab the file which results in further latency before your application really starts up.
- gabemart 11y ago> The biggest issue is yet another file for the browser to fetch. There's no reason you can't concatenate jQuery with the rest of your JS.
- BinaryIdiot 11y ago> There's no reason you can't concatenate jQuery with the rest of your JS. True and most applications should really do this. In reality I've seen far too many production system still including sometimes over 50+ files.
- whoopdedo 11y agoI thought the biggest issue is once that file is downloaded it has to be unpacked, parsed, and executed in the browser that at the same time is trying to decode JPEGs and reflow the layout. It's why pages take 20 seconds or more to load. Less javascript means less cycles burned executing boilerplate framework factories means faster page loading means longer battery life means you can keep that two year old phone that's not quite so fast instead of throwing it in the trash. jQuery causes global warming. (tongue-in-cheek of course, but not entirely)