22 ms·
I wouldn't mind a smaller version of jQuery, I've heard of some, I've also tried min/slim versions. Still including a 200+kb file for jQuery... to just use wel
by ge96 10y ago
I wouldn't mind a smaller version of jQuery, I've heard of some, I've also tried min/slim versions.
Still including a 200+kb file for jQuery... to just use well these are the most common ones I use:
var targ = $("#targ");
targ.show,.hide,.val(),.text(),.css,.post(),.done,.promise(),.each(),.remove(),.on('blur" or .on({ blur: mouseup, .height(), .width(), .scrollTop(), etc...
Probably much more, yeah certainly shorter code, gotten used to using it.
edit: At this time I always build with jQuery, always include it in the <head> section. Could wait if it's a potential thing to slow down loading of site but I usually just have a copy on my server.
- iSnow 10y agoHm, over here, the 3.2-version of jQuery comes in as something like 85Kb, 323Kb when zipped. The slim build under 70Kb and compressed it's something like 20Kb. And there's zepto which comes in at around 10Kb.
- ge96 10y agoHaven't heard of Zepto. Will check that out. I realize too that ~70KB is not bad really. But I was working on a site for a client where their internet speed is 0.3Mbps and a ~300KB file was taking ~300ms+ to load. No maybe more than that actually(can't recall right now). 1KB files were taking a second to load. I don't know, had to figure out a closer data center and change the site a lot with how it loaded stuff.
- Jazcash 10y agoThe full version is 30KB after gzipping
- pluma 10y agoFWIW while gzipped sizes are more interesting for network performance, non-gzipped sizes give a better approximation for parsing times, which can be significant on low-powered mobile devices.