5 ms·
The original HN is one of the fastest loading sites I regularly visit. You fixed that pretty good. Disclaimer: I'm on terrible internet connections most of the
by sdfjkl 9y ago
The original HN is one of the fastest loading sites I regularly visit. You fixed that pretty good.
Disclaimer: I'm on terrible internet connections most of the time and it really makes you hate all this modern web crud. Often "dynamic" sites don't load at all because while the initial HTTP request eventually gets through, one or more of the following XMLHttpRequests or whatever fail, and a lot of the time there is no handler for retries, or no error handler at all, or moronic timeouts (either far too long or far too short).
- vincnetas 9y agoJust tested that :) Clean load 22 requests, 1.1 MB 38sec vs 6 requests 48.8 KB 4sec
- zingmars 9y agoTo be fair, it does seem to be pre-loading the pages the links at the top of the page lead to... Except then it also makes a request which ends up being ~7-8kb in size when you switch to a tab for the first time. This is a pretty good example of older websites vs 'web 2.0' I guess.
- emteycz 9y agoNah, it's just poorly done.
- toomanybeersies 9y agoI also spend a lot of time on terrible internet connections, it really makes you realise how poorly optimised some websites are. HN is one of the few websites that consistently loads properly for me.
- sdfjkl 9y agoI'm guessing nobody tests for this, because everyone develops on fast, reliable internet connections and it's not super easy to simulate, although there are tools, dummynet probably being one of the oldest: https://gamedev.stackexchange.com/questions/61483/how-can-i-simulate-a-bad-internet-connection-for-testing-purposes https://gamedev.stackexchange.com/questions/61483/how-can-i-...
- jbreckmckye 9y agoChrome comes with a network throttle built-in.
- sdfjkl 9y agoCool, didn't know that. No excuses not to test properly then! :)
- toomanybeersies 9y agoIs it able to simulate spotty connections, where the connection keeps dropping in and out? Because I find that tends to be the thing that websites and applications most often don't factor for properly.
- rthomas6 9y agoIs this because it's a quickly made demo vs a refined production-ready site, or is it a direct result of the way the sites are made? Can you use GraphQL, React, Express, etc. and make a very fast website?
- jbreckmckye 9y agoYou can, but it's a lot harder than building a very fast website that just uses Express to render Pug templates and that caches HTML in a CDN.
- rthomas6 9y agoIf the site is static enough to do that, why wouldn't I just use a static site generator? Not being snarky, I'm really trying to learn.
- jbreckmckye 9y agoYou might need to retrieve your document content from a database. The CDN can phone home every so often to check its caches are still valid. This is basically how we served The Guardian.
- dullgiulio 9y agoHandling timeouts and refetching failed resources is one job for the browser, which are quite good at it nowadays. There is no need to badly replicate (with extra bugs) this tedious logic in Javascript for each and every website.