Live data from Hacker News

Ask HN: Why and how is Hacker News so fast?

news.ycombinator.com

11–20 of 110 posts

Re: Ask HN: Why and how is Hacker News so fast?

#11
post #7

I haven't done any real analysis of it, but I've always assumed it's because it renders up a single small HTML document rather than large core content and dozens of external references (ads, analysis, etc.). Looking at this page in my browser's network analyzer, I see a request for the page itself (3.8k), followed by requests for the css and a few images which don't impact layout. On top of that, JS isn't used for la…

And the JS and images are probably cached anyway, since they don't change like the rest of the design.

Re: Ask HN: Why and how is Hacker News so fast?

#12
Not pulling in a ton of external javascript, images, and ads is probably the biggest, but one thing that helps is that most comment threads have a relatively low number of comments. This page currently only pulls down down 12KB (compressed to 3.75KB).

A thread like https://news.ycombinator.com/item?id=9976298 with ~600 comments pulls down 785KB (compressed to 143KB)

In general, looking at the network tab in the developer tools will show why one site loads faster than another:

https://developer.chrome.com/devtools/docs/network

https://developer.mozilla.org/en-US/docs/Tools/Network_Monit...

Re: Ask HN: Why and how is Hacker News so fast?

#14

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.

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

Re: Ask HN: Why and how is Hacker News so fast?

#15
For your need to simulate a 256kbps connection, two things have worked for me. Both require a good few mbps connection to begin with though:

1. Use Chrome's device emulator mode. You can ignore all other settings like screen size, user agent, etc. and just use the speed restriction. 2. Use a specialized WiFi router. I use the ones from TP-Link in which I can restrict speed for a particular device IP. DD WRT based routers can also help here.

Re: Ask HN: Why and how is Hacker News so fast?

#19

Not pulling in a ton of external javascript, images, and ads is probably the biggest, but one thing that helps is that most comment threads have a relatively low number of comments. This page currently only pulls down down 12KB (compressed to 3.75KB). A thread like https://news.ycombinator.com/item?id=9976298 with ~600 comments pulls down 785KB (compressed to 143KB) In general, looking at the network tab in the devel…

Can someone buy the .text TLD already and make a whole part of the internet where this approach is standard?
Post reply on HN