Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've heard of lighter versions of jQuery and it's not really like I'm against jQuery in this particular case internet speed is really bad... and I did not know of a way to async load scripts and not have the $.is not defined problem. Mainly though the jQuery library itself is 80KB (jquery-min)... the downloading speed thing (watching network) it's hit and miss, I mean I see a 1KB file take nearly 1 second to download so why wouldn't an 80KB file take 80 seconds to download.

It's good though to learn pure JavaScript I think. But yeah I got so used to the calls that deal with cross-browser problems.

thanks for the thought



> I mean I see a 1KB file take nearly 1 second to download so why wouldn't an 80KB file take 80 seconds to download.

This does not follows though, TCP doesn't works like that, the initial congestion window is usually small and grows as more packets are received, that's why using Keep-Alive is so important, so you don't have to rebuild the socket and TLS connection before every request. Add some ping into the equation and getting the socket up to speed can take several seconds (even minutes) depending on the bandwidth, and the connection's packet loss.


Yeah I'm not 100% clear on the console waterfall thing, it shows stuff like 'this file was waiting to start downloading for some milliseconds..." then the time to download.

I use Apache, I haven't touched the KeepAlive I guess that is something to look into, a direct ping has a latency of around 300-400ms pretty high I realize... I rent through OVH and their closest data center relative to the Philippines is France... supposedly they have one coming somewhere in Asia like Singapore or something...

We do use Cloudflare but we currently use a free Cloudinary account to host our images and I cached them locally to get around that API/hr request limit. So while Clouflare helps with minizing possibly closer... the "processing" of stuff like querying with PHP/MySQL takes place on the server... I used this awful JOIN or COUNT statement that took like 300ms to execute it was bad... haha. Minor fixes.


Right, jQuery is 80k, but there are replacements that are as small as 8k, or even 4k: http://minifiedjs.com/#sizeCmp




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: