How Browsers Work: Behind the Scenes
Join the DZone community and get the full member experience.
Join For Freeas she states in her home page : " in the years of ie 90% dominance there was nothing much to do but regard the browser as a "black box", but now, with open source browsers having more than half of the usage share, it's a good time to take a peek under the engine's hood and see what's inside a web browser. well, what’s inside are millions of c++ lines... "
do forget to miss check also her client side performance tips .
below are some teaser text and images from her article . check her article for more :)
the browser's main components are ( 1.1 ):
- the user interface - this includes the address bar, back/forward button, bookmarking menu etc. every part of the browser display except the main window where you see the requested page.
- the browser engine - marshalls the actions between the ui and the rendering engine.
- the rendering engine - responsible for displaying the requested content. for example if the requested content is html, it is responsible for parsing the html and css and displaying the parsed content on the screen.
- networking - used for network calls, like http requests. it has platform independent interface and underneath implementations for each platform.
- ui backend - used for drawing basic widgets like combo boxes and windows. it exposes a generic interface that is not platform specific. underneath it uses the operating system user interface methods.
- javascript interpreter . used to parse and execute the javascript code.
- data storage . this is a persistence layer. the browser needs to save all sorts of data on the hard disk, for examples, cookies. the new html specification (html5) defines 'web database' which is a complete (although light) database in the browser.

main flow examples



dig more
first check her article which is very comprehensive. but if you want to dig even more you can check her article's resources:
-
browser architecture
- grosskurth, alan. a reference architecture for web browsers (pdf)
- gupta, vineet. how browsers work - part 1 - architecture
-
parsing
- aho, sethi, ullman, compilers: principles, techniques, and tools (aka the "dragon book"), addison-wesley, 1986
- rick jelliffe. the bold and the beautiful: two new drafts for html 5.
-
firefox
- l. david baron, faster html and css: layout engine internals for web developers.
- l. david baron, faster html and css: layout engine internals for web developers (google tech talk video)
- l. david baron, mozilla's layout engine
- l. david baron, mozilla style system documentation
- chris waterson, notes on html reflow
- chris waterson, gecko overview
- alexander larsson, the life of an html http request
-
webkit
- david hyatt, implementing css(part 1)
- david hyatt, an overview of webcore
- david hyatt, webcore rendering
- david hyatt, the fouc problem
- w3c specifications
- browsers build instructions
Published at DZone with permission of Spyros Doulgeridis, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments