4 ms·
In the grand scheme of things, this feels like throwing the baby out with the bath-water. The example shows a huge savings in file size, percentage-wise, becaus
by moron4hire 10y ago
In the grand scheme of things, this feels like throwing the baby out with the bath-water. The example shows a huge savings in file size, percentage-wise, because it's an extremely contrived one, being optimized for making sure these sort of optional things are a large proportion of the total document.
Real documents don't look anything like this example. They have lots of meta tags and they have footers and they are expected to be read by a wider variety of user agents than "Google Chrome on Windows" and "Google Chrome on Android".[0]
Part of the problem is that we treat HTML as a canonical data format, when it should be a rendered data format. That's not to say that you shouldn't hand-write HTML for your small site[1], but if you're deploying more pages than can be managed by hand, then you should be A) use a data format for your content that is as rich as absolutely possible, and B) statically rendering that data down to a transmission format.
[0] I shudder to think what screen readers might think of this sort of markup. I mean, I make VR applications in the browser, but I still make sure the data is semantic. It's our duty to do so.
[1] AKA "the vast majority of cases". I whole-heartedly believe that new ventures--before it is known how large they will be--should be hand-written.
- ommunist 10y ago[3] Popular web frameworks will suffer.