As a web developer, I’ve become quite comfortable working within browser environments. Yet I’ve never fully understood how they work.
I’ve also been itching to write again (about anything) and to just tinker!
So I figured I’d casually read through the Web Browser Engineering book and jot down my thoughts and learnings.
Preface Notes
I loved the History of the Web chapter! It makes you realize just how far we’ve come - and also just how impressive a feat it is to have such sophisticated web browsers right at our fingertips.
This is the first ever web page … crazy… and freaking cool.
Also this:
Since Chromium and WebKit have a common ancestral codebase, while Gecko is an open-source descendant of Netscape, all three date back to the 1990s—almost to the beginning of the web.
… amazing.
Chapter 1 Notes
CH1 was fun! By the end of the chapter I was already rendering simple html pages, albeit crudely!
All code is here: https://github.com/supermacro/netview/
And all it took to implement simple rendering was this:
def show(html_body: str) -> str: in_tag = False raw_content = "" for c in html_body: if c == "<": in_tag = True elif c == ">": in_tag = False elif not in_tag: raw_content += c return raw_content
Calling load(URL(url)) on https://gdelgado.ca (using http 1.0, not 1.1) works and renders this [crude] content:
Giorgio Delgado Giorgio DelgadoAboutArchives Latest Post: Reference xargs Input String In Your Shell Expressions January 7, 2022 in software While working on the Caribou Engineering Blog website (repo), I needed to do some reshuffling of the contents of a particular directory. Continue Reading ... © Giorgio Delgado 2013 - 2026. View source code on GitHub.
Or more interestingly, calling it on the first site ever renders this:
The World Wide Web projectWorld Wide WebThe WorldWideWeb (W3) is a wide-areahypermedia information retrievalinitiative aiming to give universalaccess to a large universe of documents.Everything there is online aboutW3 is linked directly or indirectlyto this document, including an executivesummary of the project, Mailing lists, Policy , November's W3 news ,Frequently Asked Questions .What's out there? Pointers to theworld's online information, subjects, W3 servers, etc.Help on the browser you are usingSoftware Products A list of W3 projectcomponents and their current state.(e.g. Line Mode ,X11 Viola , NeXTStep, Servers , Tools , Mail robot ,Library )Technical Details of protocols, formats,program internals etcBibliography Paper documentationon W3 and references.People A list of some people involvedin the project.History A summary of the historyof the project.How can I help ? If you would liketo support the web..Getting code Getting the code byanonymous FTP , etc.
Other interesting things
HTTP 3 no longer relies on TCP!
Up until HTTP/3.0, the underlying networking protocol was TCP - but moving forward the underlying protocol is QUIC, which is actually UDP-based!
Liked this post? Consider buying me a coffee :)