Hacker News new | past | comments | ask | show | jobs | submit

Web Browser Engineering (2021)

https://browser.engineering/index.html
One great thing about this book is the 'stuff I didn't do' part.

Layout is really hard. Just tables by themselves are hard, even without any css around them. CSS makes layout impossibly difficult. I challenge anyone to keep the whole CSS spec and its associated behaviors in their head.

At this point css + html + javascript have become a dynamic PDL, and probably is one of the most complex pieces of software today.

As an aside, video decoding is offloaded onto hardware, so it's not as battery intensive as it used to be.

loading story #41848785
loading story #41848729
loading story #41851786
loading story #41849657
loading story #41849487
loading story #41848784
loading story #41848643
loading story #41848664
loading story #41849444
This looks awesome. About 15 years ago, I started working on a headless browser and maintained it for several years. It used SpiderMonkey as the js interpreter and had a custom DOM implementation. It ran all the modern js from the time, AJAX, etc. Later, I added a custom Flash runtime. It basically did everything but draw to the screen. That project was a lot of fun.

I'm definitely interested in going through this book.

loading story #41847801
It's refreshing that browser engineering seems to become a "trend" now. The ecosystem is quite sparse with basically only Google, Apple and Mozilla defining it. I'd like to see forward into a future with more independent browser engines.
loading story #41848648
loading story #41848575
loading story #41850985
loading story #41848756
loading story #41847363
One of the authors here—thank you all for the nice words. Happy to answer questions!
I've been looking for a fun project to start and I'm already thoroughly enjoying this book. Kudos for making the writing particularly engaging.

This comic book about how Chrome works is also a great place to get started: https://www.google.com/googlebooks/chrome/med_00.html

It is so exciting to see material like this being made!

Browsers seem like mysterious, undecipherable black boxes, which is very likely how G wants them to be perceived, but that is cracking by seeing the efforts/results of such projects like ladybird and others!

I hope to one day be able to jump in and contribute to break that moat! And this books looks like an amazing start!

loading story #41848205
loading story #41847923
loading story #41848511
I've been levelling up on browser internals, and this book is awesome. It helps build up intuition on how browsers work, without going through the millions of lines of chrome code.
loading story #41847525
Nice book. I would recommend splitting chapter 9 into two separate chapters where executing JavaScript via Duktape is one chapter and then interacting with the DOM and events are a separate later chapter.
loading story #41848467
loading story #41854403
I'm so incredibly thankful that there are people like Pavel and Chris putting effort into articles like this. You are truly the best of us
This is wonderful!

I had an opportunity to run a tutorial on basic command line usage for newer software engineers. It's always fun to see people's expressions or read their reactions to seeing me telnet to port 25 and 80.

This is amazing, I just want to drop everything and start digging through this. Well done!
See also this previous discussion:

https://news.ycombinator.com/item?id=28898157 (409 points | Oct 19, 2021 | 63 comments)

loading story #41847363
why python, why not a system programming language like C, OCaml or Go (or newer languages like zig or odin)

Are web browsers, not considered to be "system software"

loading story #41848806
loading story #41849811
loading story #41848788
loading story #41848859
This is awesome! Nice work
Would be nice to have the option to download it as an epub to read it on my e-reader.
loading story #41850972
hey, this book looks cool! well done :)
loading story #41850021
Looks very cool, will definitely read it! Thanks!
Is there a promotional code for HN? I was a happy user of HTMLUnit [1] with Jython [2] in the past and am very interested in a future where we can automatically generate portions of browser code using code generation and verification techniques. I've never felt as comfortable with tools like Playwright/Cypress/Selenium as I did with HTMLUnit (with all due respect to both).

[1] https://htmlunit.sourceforge.io/

[2] https://www.jython.org/

loading story #41850016
{"deleted":true,"id":41848198,"parent":41846780,"time":1728997789,"type":"comment"}
I hope the AI gets good enough to dynamically translate from one language to another with high reliability, in case not everyone is a fan of Python
loading story #41850347