Forking HTML into a static language doesn't make sense
robert.ocallahan.org
robert.ocallahan.org
Rather, it needs to be completed as a hypertext, so that people can build complete software systems using (only or mostly) that language.
See the htmx examples page for stuff that should be doable in plain HTML:
The fact that only anchor and forms, only clicks and submits, only GET and POST and only full page replacement is available in vanilla HTML is the core issue. If HTML had htmx-like functionality you would see far less pressure for large, complex front end frameworks, and it would be completely within the original REST-ful web model[1] that Roy Fielding described.
[1] - https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arc...
We have so many custom UI Elements, because forms did and still do suck. RSS always had a back seat, because it always was second class in browsers. Semantic web died outside of search engines, because browsers did not offer features like "Save event to my calendar". And boy, have I been promised for a long time I might someday be able to sort HTML tables by click.
Just a non exhaustive list of my pet peeves, but there are many more examples.
An SDO could say "we're doing project X", but if nobody shows up…
I readily admit I may be missing something.
[1] - https://github.com/bigskysoftware/htmx/blob/master/src/htmx....
1) Changes to HTML can create security issues, especially if it results in a change to the HTML parser. You have to consider that non-browser use cases still need to be able to parse HTML correctly. Since we opted to make HTML versionless with <!doctype html> it became harder to do.
2) Big changes are harder to get consensus on. This is one of the reasons why they opt to do smaller, less controversial changes.
3) w3c and whatwg are dominated by large corporations, who hire thousands of engineers to work on their web properties. They are able to overcome the shortcomings of HTML easier than small teams and single-developer websites.
I agree though, this is a major problem. HTML is essentially a dead language, no major changes have been made in almost a decade.
W3C isn't interested in advancing HTML as anything and, even if they were, they'd be screaming into the night because none of the people who build browsers are interested in what they have to say. They’ve got their own club, and that's where HTML happens (and WHATWG and the browser vendors don't seem to be interested in pushing functionality into HTML in any big way, they are happy with the basic shape of the existing HTML/CS/JS trinity and don't see a big need to push for standalone HTML as a platform.)
i knew there was some drama betweeen the two organziations but didn't know the history
The stupid part was advertising of writing XML by hand - both XHTML and XSLT. That is machine format - "application" in "application/xml". Not more sense than writing JS AST. And semantic web has no advantage for author.
XHTML 2.0 - XML Events is like IE <script for>, <img>alt</img> is good, <h> is good, removal of <i>, <b> - no one would see, XForms - partly adopted, and RDF - don't know.
Though it kind of understandable - XML was in rage. Everyone pushed it, Microsoft above all, IE5 accepted "text/xml" [1]. And Microsoft pushed XSLT without XSL-FO.
Personally, I am also quite skeptical of the benefits of these approaches. I would like a web more focused on documents, but many of the "forbidden" features these communities define are actually things I was excited about when they were introduced and still would not want to miss on the web. At the same time, just limiting the technology will not make it magically better.
I would love to see more experimentation towards more hypertext and the things it could offer to the user, but just using a subset of old technology seem not really like a great way forward.
At the same time, why can having a cleaner, more performant web not be a social movement amongst developers? I still remember when many of our websites features "Valid XHTML" or "Made with Web Standards" Badges, to show our peers and the world what was important to us. Maybe setting some rough guidelines what we envision a modern, performant and user respecting web to be and whipping up a few badges to show our colors could get as further then trying to reinvent the technology from scratch?
WWW eventually pulled out into the lead, due largely to licensing considerations; WWW had been developed at CERN, which explicitly disclaimed any ownership over it, while Gopher had been developed at the University of Minnesota, which preferred to leave its ownership claims ambiguous. People gravitated towards WWW for the simple reason that they knew no one would sue them for using it.
As WWW's userbase grew, demand grew as well to add features to it. Mosaic added images and image maps; Netscape added JavaScript; and on and on and on. Eventually WWW grew to the ginormous, do-it-all system we know and (ahem) love today. Because Gopher had been left behind in adoption, it didn't have those pressures to extend its capabilities; it was free to remain the simple hypertext system it was in the early '90s.
I see a lot of people today point to Gopher as an example of what the Web should be. But this misses the point; the Web isn't what it is because of some design decision it made that Gopher did not, the Web is what it is because it had users. The more users there were, the more things people wanted to do with it; and the more things people wanted to do with it, the more features got tacked on.
If Gopher had been the one with the permissive licensing back in the '90s, it's very possible that it would have been the hypertext system everybody used, and today we'd be complaining about how complex Gopher has become and asking "hey, whatever happened to that toy Tim Berners-Lee was hacking on back in the day? Remember how simple that was?"
“Both Gopher and the Web embraced the idea of hypertext. Both allowed users to follow a conceptual path through a virtual space by following links, with little need to understand the structure that existed underneath. They differed considerably, however, in the information architecture that they established for laying out hyperlinked information. The main difference between the two is that the HyperText Transfer Protocol (HTTP) of the Web was built up around documents in HyperText Markup Language (HTML). This markup language allowed document creators to place links within documents, whereas Gopher provided pointers to documents through menu files, which existed separate from the documents themselves. The indexing component of the two information architectures -- i.e. the part that enumerated what items existed within the information space and where they could be found -- thus differed considerably.” From https://ils.unc.edu/callee/gopherpaper.htm
I was using Gopher and WAIS (nobody seems to remember that), both improved versions of FTP, when the web appeared. It immediately captured my imagination, and I and everyone around me forgot about the other protocols (except FTP, which hung on for ever). It had nothing to do with licensing. It was hypertext.
JS requires audit - even small script can game rank by encoding JS and CSS in other resources to pretend there is not much of it. Audit requires reproducible response, can be gamed, requires web of trust.
In the end it is all about goodwill, which may be hard to find in spyware ridden web.
Could it be a common language? Perhaps. I liked HTML2. I hated basically everything which went into HTML3 and HTML4. HTML5 has made a lot of good progress on rolling this back, but we're not there yet. It's possible to write parsable HTML5, but most organizations don't do it, and the ones which do don't have common ways to do it.
It's hard to remember, but back in the HTML2 days, the web had a certain type of client-side programmatic experimentation which is absent today. Anyone could write a tool which would grab things from the web and do meaningful things with them, and many people did. Google evolved from Altavista, which was a tech demo at DEC.
To be clear: The web is a lot more programmatic today in a general sense (client-side browser extensions, AJAX APIs, embedding webkit, etc. etc. etc.), but one part of that flexibility is gone, and it was important.
Today, much of the web consists of an empty DIV, populated with JavaScript from JSON objects. I can't do anything with that.
One step down, I have a structured, semantic document, but the semantics are defined as `class` elements. I can do more with that, but not a lot.
With HTML2.0, I couldn't keep much on the web, but it was semantic. I knew what body text was, what a header was, etc. Semantics are defined in the DTD, which is super-nice.
HTML5 points a path forward, with elements like `article` and what-not, but it's still got a ways to go before I can understand the content of a page in the way I could with HTML2.0.
There's a deep anti-pattern in there, wrapping things in wrappers, but that's a longer story.
There's a separate issue that a lot of stuff requires JS, but the JS mostly just calls JSON endpoints, so that's easy to scrape. The tricky thing is scraping ASPX sites that jump through a bunch of hoops instead of having a simple backend API.
The early web were the era of dozens, perhaps hundreds of competing web browsers which were made possible by simple, well-engineered web standards. Pages were served statically, or with CGI scripts. You had a whole swarm of generic spiders, crawlers, and bots which automated things on the web for you. Anyone could write a web browser, so many people did.
The dot-com boom/bust had companies doubling in size every few months, people who could barely code HTML making 6-figure salaries, Netscape imploding, early JavaScript (which, at the time, looked like a high schooler's attempt at a programming language), and web standards with every conceivable ill-thought-out idea grafted in.
If one of the first programs you ever wrote was a scraper for an ASPX site, you never saw the elegance of the early days. ASPX came out not just after HTML3, but after HTML4.
Most definitions of the early web include the PHP Cambrian explosion because essentially all websites today got their start then and only a few horseshoe crabs sites (mostly the homepages for CS profs!) predating it survive. Gopher sites were also probably really easy to scrape too. ;-)
But my original comment was 100% unambiguous: "I liked HTML2. I hated basically everything which went into HTML3 and HTML4."
Y'all responded by citing bad examples from the HTML3 / HTML4 era as examples of things going wrong...
---
Note: Before I get jumped on for "kid," it's the username.
Next, HTML2+SGML were also well-designed, and people weren't just doing regexp. The mess didn't come in until HTML3 and even more so, HTML4.
Today, it's easy to parse /specific/ pages. If I want to automate one web page, and it's well-formed, HTML5+AJAX makes that easy.
However, in contrast to HTML2, it's very hard to parse pages /generically/. That's why I gave the example of Altavista and a11y tools, which need to work with any web site.
Try to make something like that today: a generic search spider, a web browser, or an a11y tool. See how far you get talking to JSON endpoints. They're often easy enough to reverse-engineer for a specific web site, but you need a human-in-the-loop for each web site. With HTML2, one would build tools which could work with /any/ web site.
And boy were there a lot of tools. Look at all the web browsers of the nineties, and the innovation there.
Sure, nothing is guaranteed about style, but that doesn't mean, for instance, that tables can't be styled by default and must instead look like a collection of lost strings on the screen.
I must admit I was pleasantly surprised by the bold implementations of DETAILS and SUMMARY, but still, there seems to be some sort of unspoken industry-wide manifesto against this.
With regard to your second point, I’m not talking about user style sheets, but about the prospect of writing unstyled HTML. If I ever get to post anything on my personal website I will walk the walk and use plain HTML, yes, but I doubt this will have any meaningful impact!
I'm trying to explore this direction, http://sergeykish.com/live-pages - just a few rules. Publish it, this page is from 2015, finally published. I believe the main obstacle is authoring and I want to resolve it. Write in markdown, run generator, apply themes, explore in devtools, host it - too much hassle, too professional.
We can write right on the page. PUT that page on server as it is. GET it back. Sync with static storage. Write own tools. That's simplicity, it is empowering.
Here is a relevant example. The very first website ever made [1] renders like this [2] without a viewport meta style on a current iPhone, but like [3] when you include this tag which made its debut decades later. Again, I believe way more could safely be done from the browser side, but this would be a sane start.
Edit: I realize I'm giving the oldest possible example, which necessarily triggers quirks mode, but the same can be said of any modern, proper HTML document without CSS.
[1] http://info.cern.ch/hypertext/WWW/TheProject.html
That is much harder, there was no simple answer [1], browsers displayed viewport, some (Opera Mobile or Mini) had text reflow option. One company decided that it is authors responsibility [2], others followed. And now it is bad default.
So what can we do? Improve own experience – vote with your feet, inject setting in extension, patch and compile open source browser – plenty of options, and write about it. From my experience – Linux, uMatrix, Stylus, patch Firefox, have to write now (I'll edit later). That's why why meant by "have you updated yours (user.css)?".
If anything we need more choice. Build your own browser -Ungoogled, Iridium, Tor browser, Beaker Browser. Hack on smaller codebase - Netsurf, Dillo. There are graphical DOS browsers, console browsers, BeOS browser, Plan 9 browser, Emacs browser.
I mentioned quirks mode (correct, without doctype) to show how insignificant details with almost no presence still guarded by browsers. That page was written before pixel perfect reproduction was a thing. There are a lot of pages from another era https://theoldnet.com/
[1] https://www.quirksmode.org/mobile/viewports2.html
[2] https://developer.apple.com/library/archive/documentation/Ap...
Thank you, Sergey! And now that I've taken a look at your home webpage I'm happy to see you agree with me!
Thanks for the detailed explanations and the links. Comments like yours make HN the Internet gem it is!
Without the cooperation of my coworkers, bosses, and third party suppliers, very little of what I do will stick, and I have to be clever or at least subtle for that to happen. Any broad-stroke things like 'Just use HTML'? You've got to be kidding.
Of course I have my own ideas how it could work, there could be an optional headers, one from browsers saying "I want light/fat version" and one from server indicating if it's lightweight so that browser can apply better default styling and disable features. I also think it makes sense to define different levels or profiles of features so that you don't need to try to get everyone to agree on everything, but that might be problematic.
> persuading Web developers to use it is where the real problem lies
So what? There are various alternative markup formats, like Gemini, Gopher, Finger, Troff (used for Unix man pages), and perhaps we'd also count Markdown, and even RTF. Not every project aims for world domination. Websites interested in being lightweight, already can. HackerNews, Pinboard, and SourceHut, all manage it.
> getting your entire constituency to agree on a specific list of allowed features is going to be very difficult
Maybe so, but it doesn't sound insurmountable. This sounds no more challenging than any other committee-driven process.
> Video? Animated GIFs? CSS :hover? CSS media queries? Different people will give different answers to these questions.
My answer is no on all counts, for what it's worth. None of those things belong in a simple minimal document format.
> we could build a much more efficient browser (or browser mode) for that subset. As a former Mozilla distinguished engineer, I'm skeptical.
It's obvious that the system requirements for such a browser would be far lower than those of Firefox. We already have a project much like this in Castor. [0] I figure that's the point here. No-one is suggesting that Firefox, running on a modern desktop machine, struggles to render basic HTML. It's still heavyweight software though. The idea of running Firefox on an Arduino, for example, is laughable.
[0] https://sr.ht/~julienxx/Castor/
edit Forgot to mention, this question of subsetting HTML, vs using an alternative like Gemini in the Castor browser, cropped up in recent discussion at https://news.ycombinator.com/item?id=23165029
edit 2 See also Point 2.5, Why not just use a subset of HTTP and HTML?, at https://gemini.circumlunar.space/docs/faq.html
Given that we already have the ability to make lightweight HTML-based web-pages, and we also already have a variety of lightweight alternative markup languages to choose from, what's the point of picking one particular subset of HTML and giving it a brand-name? The real goal should be to encourage web developers to make better, more lightweight websites, and/or to encourage use of lightweight alternative markup technologies (to better support very simple browser solutions).
Again I think it's a fair point.
Another related point: the Gemini project seems to be capable of automatic conversion to HTML. Any such project should make this ability a priority. If you then go ahead and use that, you get an HTML subset 'for free', as the generated HTML files will be lightweight and use few HTML features.
We do this today with Markdown. HackerNews won't let me generate a <blink> tag, but we're allowed <i> tags.
For better or for worse, this stuff is standardized via WhatWG & W3C as well as the three remaining browser engines (chromium, gecko, and safari) whose intersection of behavior is the de-facto reference and also what is driving standardization forward. Forking those definitely does not make sense unless you are the size of Apple or Google and more than one big company has backed out of pushing their own implementation (e.g. MS).
Most so-called full stack apps bypass the business of parsing of html5 & css in favor of just directly driving the DOM api. This provides greater flexibility and generally sidesteps a lot of complexity, bugs, etc. related to subtle differences between the 3 implementations. A typical index.html contains little more than the bare essentials to load the javascript; which then drives the DOM directly. This annoys some purists/traditionalists on the web definitely not in a position to fork or support their fork of any browser but makes little difference to search engines, users, or browser implementations.
So now having established that this is mostly an academic discussion of forking something that is highly unlikely to be ever actually forked (successfully), we can look at the underlying question.
This would be whether the DOM still an appropriate way to represent highly complex and dynamic applications that are not primarily documents and increasingly cover the whole range of any kind of interactive application possible (terminal UIs, windows based UIs, games, VR/AR, voice driven chat bots, etc.). For better or worse, most web development is about providing an illusion of more interactivity than a typical document would provide. The business of rendering static text to a browser is kind of a solved problem. It's everything else that's kind of hard to deal with via a DOM api. WASM is breaking this discussion wide open as suddenly people are porting decades worth of native code to run in a browser. Just because you can doesn't mean you should of course. But there's a lot of UI that can run in a browser that doesn't need or completely bypasses the DOM these days. Accessibility is a good remaining reason to still use it. But beyond that?
If it is so hard to layer a coherent and not laughably overcomplicated runtime on top of a document viewer in 20 years, then it follows that it probably wasn't such a good idea to begin with. Unless you're hellbent to freeride on the web's success, and ruining it in the process. At which point we're trying to solve an economic problem (someone else's) via a technical solution.
To get a sense how far of the mark browsers still are, you only have to look into the problem of rich text editing on browsers, which is a natural step up from pure text browsing, and something the first browser did already. Today, this is only barely possible thanks to a couple rich text editor projects who made heroic efforts to work out browser quirks (with contenteditable such that the browser's spellchecking can be leveraged, or alternatively using Canvas/WebGl, essentially developing a browser-in-browser).
In a situation where browser vendors struggle to keep up, adding additional tech such as WASM is the last thing you want to do. When and if WASM gets even basic language infrastructure such as gc, DOM or WebGl bindings, or anything even mildly interesting, then it'll immediately become another maintenance problem. And as you said yourself, at best WASM can help port apps over to a browser. It's however not clear what the purpose of that exercise should be when said apps run just fine outside the browser. I'd say if there were indeed so many apps waiting to be ported over to running in the browser, then there have been sufficiently sophisticated transpilers for like 15 years now (emscripten, gwt, many others), so I'm not buying that as an argument to make browsers even more complex.
There already several tiers of the browsers. Top tier opens competition with native/mobile. This may be huge - Windows, Mac, *nix, iOS, Android - universal application without walled garden.
Next tier works with mostly static content - NetSurf and Dillo. Dillo is fast, no need to throw away web. Any open source browser has entire history - pull and compile. First Mozilla check in is before Gecko - Layout Classic [1].
It is not browsers who ruins experience but authors. I browse without JS, it works.
[1] https://github.com/sergeykish/gecko-dev/tree/init/lib/layout
Most of what I do on the web resolves around reading things, not interacting in any meaningful way. Most of the web tries it's best to ruin that experience. Most of what I do online would be better served by gopher. I understand I am a part of a minuscule minority, but that doesn't stop me from whining.
I have thought about what I want since writing. I want a format where the receiving end decides how to display it.
Tabular data? Give me a default sort and leave the rest to me. Images? Should they break text or be showed as a thumbnail with textflowibg around it?
I haven't thought a lot about it, but I want content with metadata attached.
I still don't get it, most of the web perfectly works without JS, so what is the problem? Most of the authors equally don't care about your and my case. Maybe text around article? It is easier with CSS support, thought it should be possible to replicate reader mode heuristics if it was not done already, fetch what to hide from UserScripts or create alternative.
Images may come in different resolutions (up to 8K).
You were supposed to write your webpage in pure XML -- this way the content was pure, and can be indexed, processed by other programs, etc. -- and then styled by XSL transformations.
I spent a lot of time learning this. It never caught on. Browsers still support it.
(I don't know how much of that is attributable to XSLT's nature, and how much of it is due to its relative obscurity. But it's certainly not a stack that I would choose for a new website based on that experience.)
Anything else where it shines?
There is no "time until valid paint". Everything renders when it's done, which means you get a lag before things show up in screen where you otherwise already have things rendering.
The really clever, wonderful part of HTML/DOM that is worth keeping around is that it forces you to describe your current page/application state as pure text.
Imagine if every time you wanted to write a GUI app with GTK, you were first required to build a functioning terminal interface, and then (for the most part) only allowed to pull elements from that terminal interface into the main GUI of your app. That is how the web do.
So proposals around, "HTML needs to be its own static thing" kind of miss the point in my mind. Suppose we had an amp-like purely declarative format that replaced HTML and it had some basic controls around data-binding, and infinite scroll, and whatever. At that point, it would cease to be a semantic presentation layer, it would be a document layout tool.
Of course, no system is perfect, there are some exceptions in HTML that blur that line, largely because the web is very messy and its hard to correct mistakes once they're out in the wild. And yes, Google is pushing templates and shadow-DOM, both of which are bad ideas that make the web worse. We can't win everything. But I will still strongly assert that HTML is not here to make you happy as a developer -- HTML is for the user. The point of HTML is that it forces you to describe your interface as semantic data, not pixels.
----
To extend off of that point, the other thing I'll go to my grave asserting is that once you start to think of HTML as a user-accessible presentation layer for what your state is right now, you start to realize that the distinction between web pages and applications is kind of garbage.
Most apps are just interactive documents, regardless of whether they're online or on native platforms. There are some exceptions (3D editing software, maps, etc...), but for the most part what I tell UX designers is that if they can't sit down and describe the current state of an application as an XML tree, they probably don't have a very good grasp of what that state is or how to organize it for the user.
I think I can count on one hand the number of apps I have installed on my desktop computer that couldn't be expressed in HTML. Even apps like Photoshop turn out to be XML documents with a few embedded canvases once you really think about them.
Plus it did not help that the entire device rebooted on a markup parsing errors and such bugs.
I suppose, strictly, it did have WMLscript to go with it so might not be suitable for the original author.
In 2000 they also had WAP-over-SMS. That was slow. And expensive. One SMS could carry 140 bytes.
To prevent custom UI, also disable CSS and use a decent default stylesheet (e.g. the reader mode one or a Markdown one).
Consider that these are the same devs complaining about the feature differences between Chrome and Firefox, let alone the vast majority of developers would consider targeting something like Internet Explorer 11 (which already contains A TON of functionality, WAY more than you'd need for a "trimmed down fork" and is still a VERY complex project if you wanted to make a full clone from scratch, despite it being a few years out of date) as something they'd do only in their worst nightmares.
This is why such propositions are hard. Well, that and all the existing web sites that use the existing tech, most of them not being made by huge corporations with big pockets and often are left alone to work with barely any modifications (web development is often made fun of for being too brittle, but this brittleness exists at the framework level, not the web browser level that has very strong backward compatibility).
I think if you designed a document language that took advantage of 30 years of experience of what people actually want to do on the web, you could find an entirely new set of users. People who want to feel ownership of what they publish, want to be able to be creative and improvise, but don’t have the technical skills to create a site in the current web stack. It would probably look more like a social media service, so it could run on top of the web as it is now, or have dedicated native clients.
Back in the early web people couldn't run their own server not because HTML was hard (WYSIWYG editors not only existed since the Windows 3.1 days, but they were very widespread at the time - Netscape Gold even came with one included and that could do pretty much everything you'd see in most pages) but because it was hard to have and maintain the necessary hardware and internet connection.
This still exists and is still an issue today if you want the full ownership down to running your own server. But if you do not care about running your own server and you are fine with shared hosting (which existed even in the 90s, see geocities) or a VPS, then outside of a basic setup you do not need to be much of a technical user (and many hosting and VPS providers have tools to do that setup for you, often for free). For the slightly more technical users, there are tools like Publii (stupid name, but the tool works) that can do mostly full WYSIWYG site editing, management, syncing, etc.
And a dedicated native client? From a user's perspective there is nothing to win here, they already have a browser (and the less technical users are confused by even that), why would they run another browser that wont even work with the majority of the content they want to access?
Really, these are not practical solutions for practical problems. That doesn't mean you shouldn't try to make something like this, but they'll just be toys for fun, not real solutions to real problems and if you expect them to be anything like that you'd be disappointed.
After all Gopher, for example, exists and can be targeted and used, but all of its users are using it for fun and because they can, not because they expect it to compete with the web (well, outside of edgy "the web sux, gopher is the future" comments that are at the same level as "M$ suxx0rz, linux rulez" you'd see not so long ago).
Publii or anything you could one-click-install on a web host is nowhere near fully featured for what people actually want to do on the web. Again, look at the type of activity that happen on most social networks - liking, sharing, commenting, replying, bookmarking, retweeting, remixing, curating playlists and galleries, etc. Those communal space-building activities have become as foundational concepts for the internet as linking, but are exceptionally difficult to implement on the current web.
I agree. I like the idea, but there's no way it would get traction without solving a concrete (rather than aesthetic) problem.
It is possible though: the more expressive/powerful a system is, the less we can know/guarantee/figure-out about it. Adding features does have downsides. For example, people are starting to pay attention to pure functional programming, since the restrictions it requires (e.g. immutability, referential transparency, confluent evaluation, etc.) provide lots of nice solutions for things like concurrent, distributed systems.
The classic example on the Web is search: if sites didn't work with dumb, lightweight user agents (search bots), it could have a real commercial impact. These days the big search engines use browser-derived bots, which has changed the dynamics a little; but the core point remains the same. If people find concrete problems or opportunities faced by Web sites, which would be useful to solve automatically, but where the complexities of the current Web prevent that, then perhaps people could be convinced to use a restricted subset of the Web.
Who says this?
I mean is it worth to write a response to some vague idea that no serious person has actually put forward?
Several people. If you follow HN and geek blogs, it comes up often...
I agree, we shouldn't need to create a new standard to do what's already possible with existing HTML and some basic constraints and best practices.
As it is, every piece of tooling has to define its own arbitrarily limited subset or an unlimited set of features (and associated attack surface).