7 ms·
Because it is 2018 and people have forgotten how to static HTML. All that lovely rendering code in your browser goes unused as people rewrite it in Javascript,
by tsukikage 9y ago
Because it is 2018 and people have forgotten how to static HTML. All that lovely rendering code in your browser goes unused as people rewrite it in Javascript, badly; or even in C++ and then compile to web assembly, that’s all the rage now, because why stick with one layer of abstraction when you can involve three?
Oh, and of course everyone rolls their own, so that website with the dancing pigs not only has its own stack, but also one for every ad and tracking network it pulls in. It takes a whole lot of javascript to provide that transparent pixel!
The situation is no better on the server side, of course. Why write static HTML for your pageful of text when you can have a web framework pulling C++ from a SQL database, compiling it to web assembly on the fly and vomiting forth to the browser just in time because someone might want their flying unicorn background to have different colour sparkles and pointing those people at a different static location is just gauche.
No, I’m not bitter, far from it. It all makes work for the working man to do.
- nkkollaw 9y agoAww, come on. People want and expect websites to be very close to web applications that react to who you are, what actions you take on the page and a myriad of other factors. That's just not possible with static HTML.
- tsukikage 9y agoI have a whole separate rant about HTML5+CSS and Turing completeness, but responding with that here would make me part of the problem. In all seriousness, we need waaay fewer layers of dynamic abstraction than actually get employed to solve most problems.
- nkkollaw 9y agoIf tools are used incorrectly, it's a problem. But don't say that static HTML was better or would be better, because it simply wouldn't on a high percentage of websites.
- king_magic 9y agoI fundamentally disagree. I don’t think ‘people’ really do want that. That reminds me of the thinking during the 90’s and early 00’s that everyone somehow must want 10 browser toolbars that spam them with ads all the time.
- nkkollaw 9y agoObviously, it depends on the site. However, when you're on YouTube you don't want the site to suggest videos you're not interested in (or Amazon, products). When you're on a blog, you don't want "related articles" to list articles you've already read. Etc. Etc. I don't know if people want this--in part because they don't even realize these features exist--but I'm sure the opposite can be annoying. It also depends how modern techniques are used, but arguining that we have to go back to static HTML because it's better doesn't make sense to me.
- oedenfield 9y agoAs a user of both YouTube and Amazon.com I really don't want either recommendations you mentioned. I go to YouTube to watch specific videos and I go to Amazon to buy specific things. Those organizations want to give me recommendations but if I could turn them off and gain performance I would do that in a heartbeat.
- nkkollaw 9y agoAh, I see. I discover awesome things on both platforms this way. On the performance side, Hacker News still takes 100MB of memory in Chrome, so...
- tluyben2 9y agoYou cannot create an efficient static page with recommends below a video? (clientside that is; serverside it would be dynamic but Chrome should not be bothered, it is, but that is another story)
- nkkollaw 9y ago
- flohofwoe 9y agoI don't know, WebAssembly compiles to very small blobs (if done right), you can get a lot of functionality out of a few KBytes. Imagine if we could throw out all the high-level crap from the browser core (WebAudio's node graph, all the video and audio codecs, HTML/CSS/JS engines with all legacy features they need to support, etc etc... and replace that with wasm modules which are only loaded on demand. Then browsers would become much smaller, and web pages would only need space for the features they actually use. Of course this wouldn't be a 'web browser' in the traditional sense, but a (reasonably) safe runtime platform for untrusted code without a central 'Big Brother' who decides what is good or bad for users.
- tsukikage 9y agoI’ve not seen much WebAssembly “done right” to date; IME it is most often employed to spew gargantuan legacy C++ applications verbatim into the browser to avoid having to understand which parts are actually desired, whether and how they can be unpicked from the rest, and whether they are trivial enough to actually just reimplement in Javascript or otherwise as standalone modules. This does not bode well for the utopia of small clean blobs you propose, though I do agree it would be nice if it came to pass. I am perhaps too pessimistic here; wasm is young and has still to develop much of its own culture. I shall watch that space with interest.
- Grollicus 9y agoDon't worry. If we've managed to blow our binaries up to 100s of MB, we can do it with our websites, too! (Seriously. Chromium is 124MB. How does anyone think web dev will go differently?)
- tluyben2 9y agoWe will never go back ; there is only a tiny niche group (embedded, retro and demoscene) that cares about tiny and efficient. The rest simply wants to deliver features fast. On their (I include myself in that often) island, most reason that computers are fast enough and have enough memory. But that arguments really does not take into account things like: multitasking (if all devs think like that, what happens when you run 20 apps at the same time?) and, in many cases, battery life (that does not have to be the case; bloat does not have to hog cpu but often does).
- littlestymaar 9y agoWriting small footprint website helps, but the major culprit here is Google Chrome. It consumes way too much memory per tab (compared to Firefox on Linux), I've heard it's because it has a strict «one process per tab» policy, whereas Firefox has several processes but not one per tab.
- gsnedders 9y agoChrome doesn't have a strict one process per tab, but doesn't cap it anywhere near such a low number as Firefox (currently) does.
- endless1234 9y ago>The situation is no better on the server side, of course. Why write static HTML for your pageful of text when you can have a web framework pulling C++ from a SQL database, compiling it to web assembly on the fly and vomiting forth to the browser just in time Any example of where something like this is actually used? I'm also interested in hearing why browser rendering code goes unused when displaying a javascript-powered site.
- blattimwind 9y agoWith PHP there are a bunch of people who put PHP fragments in a database and pull that together with some queries, append and eval it. I wouldn't be that surprised to find someone doing it with PHP fragments echo'ing some JS.
- endless1234 9y agoIt's certainly _possible_. I just think it was unnecessary hyperbole that doesn't really have anything to do with the topic at hand, since a static pure html website is going to use a lot of memory on Chrome anyway.
- dzek 9y agoYou're wrong. Empty page with no scripts still costs 100MB of ram.
- logicallee 9y agoOpen a few hundred tabs on Android (where no Google developers have special 64 GB, or even 32 GB of RAM phones) and you will see it does just fine. So it's not about what the web is or isn't.
- tsukikage 9y agoAutomatic tab discarding is very aggressive on mobile installations compared to desktop. They used to let you enable that feature in the desktop browser if you like having tabs that reload when you switch back to them - no idea if they do in the current builds
- tim333 9y agoHowever if you open a static HTML website such as the tasteful http://motherfuckingwebsite.com/ http://motherfuckingwebsite.com/ it still shows 122 MB used in Chrome Task Manager in spite of the source being 0.005 MB.
- MaxBarraclough 9y agoEh, even that site uses Google Analytics. There's a comment in the HTML: <!-- yes, I know...wanna fight about it? -->
- macspoofing 9y agoExpectations for the web are different. Also, there are more applications running in a web browser than there were in the past.