Hacker News new | ask | show | jobs
by waitButWhy 2919 days ago
Dude, this is the only site that loads when I hit my data cap on my phone, and my 4G LTE "unlimited" data plan slows down to something akin to a 56k modem from 1995.

Literally almost no other site loads in under a whopping minute, because all of them slam 10MB of transpiled javascript, and another 20MB of CSS, background images and high resolution sprite sheets for widgets I'll never even click on. Not to mention the pixels and third-party ad-tech, which may or may not be baked into the initial JS payload.

Then the document.ready() kicks in, and maybe a hundred other resources are invited to the party, and the videos try to autoplay with sound, while all the gifs start their loops.

You say old fashioned, but even wikipedia is bloated and horrible when my bandwidth allowance gets throttled by my mobile carrier. If HN didn't load, I'd either have to find a hobby and talk to people (The Horror), or cough up like $90 a week (what would actually happen) because every other web page tries to show me 2GB of video in ads alone, as if I'm going to patronize any business that blasts a cacaphony of unwanted sound in my face when I'm trying to read, all of which I suspect might be a concerted effort orchestrated as part of a conspiracy between advertisers and ISP's to poison net neutral rate plans and price gouge the hell out of anyone using their phone for internet related things, aka: everyone.

2 comments

And, as an addendum, all this ties directly into your mention of <img/> versus $ajax();

First of all, that very mindset is the foundation of the bloat we see everywhere else. Complicate a non-problem with a non-solution, because behind the trend is really a desire to shun open standards, in favor of obfuscating intellectual property as an effort to lock user behaviors, and prevent scrapers from ripping off designs that aren't even innovative. An example of the backlash against this sort of thing was the re-adoption of semantic and/or restful URL paths, because so many back-end goons were packing query strings with hundreds of CGI variable parameters, to control page state that no one could paste or email links to each other, and even advertisers started framing a renormalization of URLs under the SEO buzzword, because they saw their page rank taking hits from the drop in sharability.

Second, once you introduce $ajax(), not only does backwards compatibility hang in doubt (as you mentioned) but cross-browser compatibility and forward compatibility may also be sacrificed. Not to mention, you branch into an entirely different area of development. Because in order to make sure everything works everywhere, all the time, you'll need an ajax library, but which one? Choose carefully, you may seal you fate, if the maintainers disappear. Not only that, any JS error for any reason at all, including async resource errors, could kill alllllllllll of your images. So now we need unit tests and a QA team? Is that right? Gee, why not just use <img/> tags, like every browser has supported by default, since... oh... the mid 90's?

You make it seem as though AJAX is some unstable, bleeding edge experimental feature that no one ever uses. There's no danger of sacrificing backwards compatibility, or of browsers no longer supporting AJAX in the future.

However, Hacker News does use AJAX, and I don't think it even uses whatever img tag trick OP is referring to. The only img tags on the page are the icon and the vote arrows. If it's there, I couldn't find it.

But read the javascript yourself - AJAX support is just a single, simple function. No unit tests and QA team, no depending on some flaky maintainer. Maybe they do unit tests, I don't know, this place is kind of a black box sometimes.

I think he's annoyed that lots of people are trying to re-implement the wheel using a poor AJAX based solution when an older solution is better, but no one likes using anything "old".
AJAX is not really a new thing, though. It's probably older than some of the developers who complain about it.
It's still implemented differently across different browsers, past and present, and despite being mature it isn't exactly future proof.
Cross-browser AJAX is= a solved problem at this point. You can just go to Stack Overflow or find one of countless libraries to handle it to whatever degree of compatibility you want.

And all code is a moving target - nothing is future proof, especially where javascript is involved, but AJAX seems a lot more future proof than hacking image tags to do something other than loading images. It's baked into front-end templates and the caching strategies of the biggest sites on the web so it's not likely to go anywhere anytime soon.

You can still have a modern, presentable, fast loading website with a nicer style than Hacker News. Why isn't Hacker News like that?
No one agrees on what a nicer style is. Most proposals would either make the site less text-oriented or lower its information density. That's not nicer.