Web Browser Engineering (2021) browser.engineering · 83 points · 10 comments · H...

@best

Web Browser Engineering (2021) browser.engineering · 83 points · 10 comments · HN thread

TL;DR Web Browser Engineering is a book by Pavel Panchekha and Chris Harrelson that builds a basic but complete web browser in a couple thousand lines of Python, covering networking, HTML/CSS layout, JavaScript, and modern rendering. The page presents the book's table of contents across four parts. The HN thread is short and centers on the authors answering a critique about a WebAssembly claim in the introduction and on the book's AI-free origin.

  • The book builds a working browser from scratch in roughly a couple thousand lines of Python.
  • Part 1 covers downloading pages, drawing to the screen, and text formatting.
  • Part 2 covers HTML parsing, inline and block layout, CSS, and links and browser chrome.
  • Part 3 covers form submission, DOM scripting and events, and cookies, logins, XSS and CSRF.
  • Part 4 covers compositing, the event loop, GPU animation, accessibility, embedded content, and invalidation.
  • The authors say they wrote it from 2019, finished it in late 2024, and published it in 2025, and that none of it was AI-written.

Discussion The thread is small and mostly about the book itself. The lead author joined to answer questions and stated the book was written without AI. Much of the discussion turned to a sentence in the introduction describing WebAssembly as possibly co-equal to JavaScript, which one commenter found misleading enough to doubt the rest of the book. The author replied that the line sits in the appendix on omitted topics and that WebAssembly is not covered. The mood is mostly civil and appreciative, with some skepticism and a sarcastic aside about past web technologies.

  • Praise for the book and its AI-free authorship (a few): Commenters welcome a hands-on browser book and appreciate that the authors say it was written without AI tools. One noted it was not flagged by an AI-text detector.
  • WebAssembly claim in intro is misleading (a few): One commenter argues WebAssembly is a compatibility layer and performance tool, not a future JavaScript peer, and so doubts the book's intuition-building. Others agree the line invites objections and suggest removing it.
  • Author says the claim is not in the body (a few): The lead author replies that WebAssembly is only mentioned in the appendix of omitted topics and is not discussed elsewhere. Another commenter points to Mozilla's 2026 work on making WebAssembly a first-class web language.
  • Joke about heavy client-side frameworks (a few): A sarcastic comment imagines a React-like framework written in Rust compiled to a huge WebAssembly blob, mocking past ideas like Java applets and Flash.

Links from the comments

#browsers #webDevelopment #books #webAssembly #python