Does anyone have the idea of escaping from HTML/CSS? As these specs are too complicated and not friendly for web developers as well. Maybe we could re-invent a browser engine without conforming to HTML/CSS specs? An (early) alternative spec/engine would be a Figma-compatible vector graphics spec[2] and its rendering engine[3]. It is called VeryGoodGraphics[1]. [1] https://verygoodgraphics.com/ , the website is built…
So you want to build a browser engine
121–130 of 134 posts
Re: So you want to build a browser engine
#122Earlier quoted context omitted.
Yeah - there really is a opportunity now to rethink browsers as just sandboxed rendering windows using WebAssembly + WebGPU. Could still have typical DOM rendering handled with Webassembly delivered by the web sites (ideally cached). The challenge is though still having standards and accessibility options. That VeryGoodGraphics example allows for no text selection - and doesn't at all handle zooming. Still though it'…
How would ad blocking work in this world? A browser without ad blocking is useless.
Re: So you want to build a browser engine
#123Earlier quoted context omitted.
But that's exactly my point. This article appears to be entirely about an implementation from scratch. It makes very clear that it is not about forking Chromium. But even Google was smart enough not to start from scratch. So again, I don't know who the intended audience for this article is. It's advice on something no sane person or organization would ever do.
And yet a few people are doing it. So yeah, it's advice to insane people.
I admire any team-of-one that takes on this endeavor and publishes their work.
Re: So you want to build a browser engine
#124Earlier quoted context omitted.
"- Firefox's html parser is written in Java and converted to C++ at build time." This is surprising. Is it really true in the sense that the code that parses the HTML in a regular Firefox install was autoconverted when it was built?
Yep: https://searchfox.org/mozilla-central/source/parser/html/jav... And more info: https://about.validator.nu/htmlparser/
Looking at the source, it seems pretty easy to find Java programs that wouldn't compile correctly, but of course a fully general Java to C++ converter would be a huge undertaking. I guess with OK test coverage of the generated C++ code (which Firefox certainly has), editing the Java code remains doable.
Re: So you want to build a browser engine
#125Earlier quoted context omitted.
> Look at what happened when Microsoft eventually tried to catch up with Chrome - they gave up. That wasn't because they weren't up to the job. It's because Google was using Microsoft's playbook against them. https://news.ycombinator.com/item?id=18697824 > I very recently worked on the Edge team, and one of the reasons we decided to end EdgeHTML was because Google kept making changes to its sites that broke other bro…
YouTube did this to Firefox too - for a while they were serving a special degraded version of YT to Firefox users (polyfilled web components, instead of native web components or their classic non-web-components version) even though they had versions that would perform better. "Oops". If you used user-agent tricks you could get them to serve a good version.
Re: So you want to build a browser engine
#126Earlier quoted context omitted.
It's not really clear what this even means. HTML5 and CSS3 aren't new versions of HTML and CSS that obsolete the prior stuff; they are extensions to what already existed. So, for example, as far as I know, every web browser uses the HTML5 parsing algorithm for parsing HTML. This algorithm is very complicated, because it describes what parse tree to produce for any possible document. There's not, like, a separate HTML…
It's a semi-noob illusion that focusing only on modern standards and practices would surely result in a leaner implementation. This goes all the way back to the big push for web standards in 1998—e.g. you can find Slashdot Q&As from the early 2000s where people bring up the idea of how much smaller the browser could be without quirks mode and IE compatibility and then get corrected about how much of the code base thi…
Re: So you want to build a browser engine
#127Earlier quoted context omitted.
> used by nearly every human on earth Roughly 60% of earth's population used the internet in 2023. So not quite nearly every human .
If we exclude over 75 with no interest in using it (and no use case for it in their environmnent/culture), and under 10, we're pretty close to covering all the rest. And even the 60% is some hand wavy estimate about internet reach, about people using the internet frequently. More people use the internet than that, some transparently through some smartphone app or basic feature phone, which almost everybody has even i…
Re: So you want to build a browser engine
#128Earlier quoted context omitted.
> used by nearly every human on earth Roughly 60% of earth's population used the internet in 2023. So not quite nearly every human .
25% of the Earth's population is younger than 15. Assuming 20% of them use the internet, the TAM (not including the 3 out of 4, or 75%, seems like nearly ever human, I'd say (though it is a matter of opinion I guess.)
Much like the cliché "the internet is the sum of all human knowledge".
If you have deep specialist knowledge in a field that has existed for more than thirty years it can become quite obvious that the internet really in is nowhere near "the sum" of our knowledge.
Re: So you want to build a browser engine
#129Earlier quoted context omitted.
YouTube did this to Firefox too - for a while they were serving a special degraded version of YT to Firefox users (polyfilled web components, instead of native web components or their classic non-web-components version) even though they had versions that would perform better. "Oops". If you used user-agent tricks you could get them to serve a good version.
Now I wonder if this is a thing that still exists, and I wonder if I should be spoofing my user-agent to Chrome just as a general rule in Firefox.
UA spoofing in firefox will get you blocked by recaptcha and cloudflare.
Re: So you want to build a browser engine
#130Does anyone have the idea of escaping from HTML/CSS? As these specs are too complicated and not friendly for web developers as well. Maybe we could re-invent a browser engine without conforming to HTML/CSS specs? An (early) alternative spec/engine would be a Figma-compatible vector graphics spec[2] and its rendering engine[3]. It is called VeryGoodGraphics[1]. [1] https://verygoodgraphics.com/ , the website is built…