Re:Kosmonaut: web browser from scratch in Rust
by qwerty456127 on Saturday August 15, 2020 @05:01PM
(#24172371)
> the point of HTML is to ignore tags you don't understand and it should still render.
IMHO it could help a lot if a browser could let you configure the way it treat a particular unknown tag: just ignore it with its entire content or treat it like another kind of tag it knows.
Re:Kosmonaut: web browser from scratch in Rust
by remram on Saturday August 15, 2020 @08:25PM
(#24173683)
I was thinking this. The canvas tag displays its contents if the canvas API is not supported, while the script tag is ignored. This means the browser still has to know about the tag to be able to not-implement it the right way.
Re:Kosmonaut: web browser from scratch in Rust
by SyneRyder on Sunday August 16, 2020 @04:09AM
(#24176123)
That's a great idea - displaying the contents of a script or a style tag would be a terrible experience. Letting the user configure it would help future-proof the browser too.
Re:Kosmonaut: web browser from scratch in Rust
by qwerty456127 on Saturday August 15, 2020 @07:51PM
(#24173495)
> If your page isn't readable in Lynx and Links, you didn't code it properly.
Lynx/Links could really use an update (excuse me if they already have it - they didn't the last time I checked). There is nothing hard nor improper in supporting/using most of the HTML5 semantic tags.
Rather than a new web standard or ignoring "legacy", I'd point out that there are even web browsers for the Commodore 64 and Apple II. You don't need to implement every tag, the point of HTML is to ignore tags you don't understand and it should still render. Pages with correct markup are still readable in ancient browsers that don't understand CSS. If your page isn't readable in Lynx and Links, you didn't code it properly.
You can't support every site obviously, but Links [3] has shown you can go a long way by just supporting a subset of web features. The speed when you're not trying to render pixel perfect layouts is astonishing.
[1] http://www.jaruzel.com/gopher/gopher-client-browser-for-wind...
[2] https://github.com/xvxx/phetch
[3] http://links.twibright.com/