Hacker News new | ask | show | jobs
by josteink 3566 days ago
> The gov.uk site is wonderful to use! It is incredibly fast, just a tenth of a second latency, it feels.

That's because unlike "modern" sites, it contains the site's contents in the HTML, so when the HTML is loaded, you have everything you came for.

    % curl  https://gdstechnology.blog.gov.uk/2016/09/19/why-we-use-progressive-enhancement-to-build-gov-uk/ >test.html
    % du -h test.html
    36K
That amount of data can still be downloaded over the slowest mobile link imaginable in a fraction of a second. And whatever scripts are needed to do whatever extra can be downloaded and happen after the fact. That's how the web used to work.

Compare to "modern" SPA-monstrocities (like blogger.com until recently), where you had actual code written to defer showing the (1KB) content (which you came for), until several MBs of fonts, scripts and whatever had loaded, parsed and executed.

It was enough to make page-loading on a high-speed connection of a modern PC take many many seconds. On a mobile phone with a weak CPU this can lock your phone up for quite a time.

If that's not an anti-pattern I don't know what is.

We need to get back to the basics. The basics worked, and the direction we're heading is doing all the wrong things.

3 comments

> Compare to "modern" SPA-monstrocities (like blogger.com until recently), where you had actual code written to defer showing the (1KB) content (which you came for), until several MBs of fonts, scripts and whatever had loaded, parsed and executed.

Whoever came up with that idea should be loaded, parsed and executed.

> We need to get back to the basics. The basics worked, and the direction we're heading is doing all the wrong things.

Frankly, it's gotten to the point that I don't even like using my smartphone anymore. Even with uBlock, sites take too long to load, they do annoying things with animations, colors and behaviour, and it's just generally a burden to use.

I just want to be able to read documents and follow links to other documents. The Web was awesome when it was a web of documents, linked together.

> sites take too long to load, they do annoying things with animations, colors and behaviour, and it's just generally a burden to use.

YOU THERE! YOU, SILLY USER!! YOU'RE SCROLLING WRONG. LET ME HANDLE SCROLLING FOR YOU!!

Perhaps someone should port lynx or links2 to smartphones.
> That amount of data can still be downloaded over the slowest mobile link imaginable in a fraction of a second.

That's a bit of an excessive enthusiasm. EDGE is effectively ~200kbps (30kB/s) with ~200ms ping, so you're at a good 1.5s assuming no dropped packets.

And that's not "the slowest mobile link imaginable" by a long shot, GPRS is under 100kbps and before that was CSD (around 14kbps, with high speed CSD around 56k)

And CSD was already 2G, 1G was NMT, at 1200 bits per second.

None of these even require imagination, they're existing historical mobile links, most of which (GPRS up) are still in active use (I believe NMT has no deployment left, and while I'm reasonably certain most telecoms have dropped CSD I wouldn't bet that all deployments are gone)

SPAs aren't helping with this.
How are they not?
By requiring multiple megabytes of bullshit to be downloaded before they can even _begin_ loading actual content.
That page might not be the best example - I think the blog is just wordpress.