We all use web browsers on a daily basis, and it’s hard to imagine getting anything done without looking something up in the online docs, ask a question on StackOverflow, talk to your colleagues via chat, or download the latest version of Xcode. And - for all of these tasks you probably use a web browser!
But, have you ever wondered how a browser works?
I mean, beyond downloading the HTML source code (that’s probably the easiest part, although there still are plenty of things to keep in mind auth and all the different image formats). No, I am talking about how to actually parse the HTML and render it on screen…
If you’d like to learn how browsers are built, how to create the DOM from HTML, render it on screen and apply CSS, you should definitely check out Web Browser Engineering. This is an online book by two people who know their stuff:
Chris Harrelson is Rendering Lead for Chrome, and
Pavel Panchekha teaches programming languages and web browsers at the University of Utah.
Oh, and did I mention they’re building a real browser in just 1000 lines of Python?