Hacker News new | ask | show | jobs
by fractalcat 3975 days ago
Loading this webpage I downloaded ~12KB. For comparison, I went to the NYT homepage and downloaded ~1.2 MB. For people with shitty downlinks like you and I, the absence of exorbitant quantities of Javascript and images makes a lot of difference - a lot more than time-to-first-byte.
3 comments

It's not just small but the HTML part is also dead simple to render.
Or for a bigger offender, I noticed a couple of days ago that Rally (https://www.rallydev.com/) loaded over 5 MB of JavaScript from 3 scripts...being loaded 3+ times each (each one is over 600 KB)! Each script seemed to contain their own copy of ExtJS. Each script returns a 200, and doesn't use a 304 either on each load :( .
that 1.2Mb gets cached. Infact that will make the site faster because once the .js are downloaded only json/partials will be fetched when visited again.

It must be the backend ,ie when tasked to render the same page ,which backend would respond faster

I have a fast FIOS connection, and the New York Times webpage still takes around 6 seconds to fully load according to the Chrome Network panel. In that time it makes 226 requests and downloads 168 KB. This is after several page refreshes, so I'm fully taking advantage of browser caching. Simply put, there's way more images, fonts, and network callbacks on that site than on HN. It's way more heavyweight. HN, by contrast, downloads all of the content in only SIX requests, at 14.8 KB total, and in under a second.

It's the number of requests that's killing the NYT site. HN is very simple and old school, and doesn't do a single thing that isn't explicitly necessary to render exactly the content you see on the page, which is presented cleanly and without frills.

That 1.2Mb gets partly cached on the desktop. Mobile clients cache very little. Safari on my iPad is currently storing only 6.1Mb of website data and I use it every day on a variety of websites.

Client-side caching is a nothing but a lie bad front-end developers tell themselves to justify producing bad websites.