Learning web browser internals in detail
October 20, 2015 12:03 PM   Subscribe

I'd like to dig into how web browsers operate under the hood. What are some good resources?

Unfortunately, the sheer volume of browser related information on the web is defeating my search skills. Ideally, I'm looking for something like the Windows Internals books, but focused on browsers.

And yes, I could go read through source code, but I'd prefer a friendly starting point with a bit more of a story to tell.

Thanks!
posted by underflow to Computers & Internet (7 answers total) 6 users marked this as a favorite
 
I think a place ot start would be understanding the HTTP protocol specifications. That link goes to RFC7230, but there are a few others listed in this Wikipedia article on HTTP that would be helpful and informative.

From this information, you and your presumed programming skills could build a basic browser, or an automated system that talks the talk of web servers/browsers.

I'm assuming an HTTP focus; web browsers handle a lot of other crap (ftp:// for example), but when they do so they aren't really being web-browsers as much as a broad application that also does ftp clienting, e.g.

I don't know how easy it is for HTTP, but I once printed up the useful bits of the NNTP specification (the USENET news protocol) and then opened a terminal session with an NNTP server, and manually entered commands so it would give me USENET headers, articles, and so on. It was an interesting experience that could probably be done with http, maybe aided with a notepad for cutting/pasting blocks of text too big to type, that http likes to exchange.
posted by Sunburnt at 12:41 PM on October 20, 2015


you might clarify what you mean. i took your question to be asking about layout engines - how the HTML is converted to something you see on the screen. but that's now what sunburnt is talking about, which is more about how the internet works - the network protocols, names, etc.
posted by andrewcooke at 1:11 PM on October 20, 2015


are you using windows? the kind of introspection Sunburnt mentions is much easier on a mac or linux box. because they have a robust command-line environment (what my friend described as 'ooooh. hacker mode' when i showed it to her). you would be well served to install linux in a virtual machine to explore some of this. you can use the telnet command to talk to webservers.

if you have exposure to a computer language, or you would like to try out one, search for 'languagename http client'. you will probably need to add open source if the language is c# or visual basic. this will lead you to text-based libraries that you can look at the acual code and are much simpler and a good starting point.

i don't know a good intro if you are looking at the layout engine as andrewcooke suggests. curious about that myself.
posted by lescour at 1:22 PM on October 20, 2015


Apologies, let me clarify as best I can. I'm undoubtedly missing some of the concepts.

I'm interested in the entire browser: communication, layout, rendering, memory management, compiler engine, page life-cycle, services and plugin architecture, etc., and how all these things interact.

I can use any commonly available platform or tools and I'm technically proficient.
posted by underflow at 1:51 PM on October 20, 2015




How Browsers Work by Tali Garsiel is an excellent resource.

Self-link: I wrote a series of articles called Let’s build a browser engine which focuses on the layout engine.

Gecko Overview is a bit spotty but has some good high-level documentation of Firefox’s browser engine.
posted by mbrubeck at 4:09 PM on October 20, 2015 [4 favorites]


If you want to watch a real-world browser engine get built from the ground up, check out the Servo project. The main components are mostly there, but the This Week in Servo blog often sheds light onto smaller additions that are important for a production ready browser. For instance, quotas for localStorage and sessionStorage just landed two weeks ago.
posted by SemiSophos at 8:59 PM on October 20, 2015 [2 favorites]


« Older Our 'Tidy Cat' is not so tidy.   |   Best Men's Field Jacket Newer »
This thread is closed to new comments.