Web Browser Engineering

4 months ago 16

Pavel Panchekha & Chris Harrelson

Twitter · Blog · Discussions

Web browsers are ubiquitous, but how do they work? This book explains, building a basic but complete web browser, from networking to JavaScript, in a couple thousand lines of Python.

The cover for Web Browser Engineering, from Oxford University Press The cover for Web Browser Engineering, from Oxford University Press

Please support us by buying Web Browser Engineering from a reseller like Bookshop.org, B&N, and Amazon. It’s currently $50 in the US and £40 in the UK, with similar prices in many other countries. Translations are coming soon!

Follow this book’s blog, Mastodon, or Twitter for updates. There’s a discussion forum for the book on Github, or you can email us directly.

  1. Preface
  2. Browsers and the Web
  3. History of the Web
  1. Downloading Web Pages
    URLs and HTTP requests
  2. Drawing to the Screen
    Creating windows and drawing to a canvas
  3. Formatting Text
    Word wrapping and line spacing
  1. Constructing an HTML Tree
    Parsing and fixing HTML
  2. Laying Out Pages
    Inline and block layout
  3. Applying Author Styles
    Parsing and applying CSS
  4. Handling Buttons and Links
    Hyperlinks and browser chrome
  1. Sending Information to Servers
    Form submission and web servers
  2. Running Interactive Scripts
    Changing the DOM and reacting to events
  3. Keeping Data Private
    Cookies and logins, XSS and CSRF
  1. Adding Visual Effects
    Blending, clipping, and compositing
  2. Scheduling Tasks and Threads
    The event loop and the rendering pipeline
  3. Animating and Compositing
    Smooth animations using the GPU
  4. Making Content Accessible
    Keyboard input, zooming, and the accessibility tree
  5. Supporting Embedded Content
    Images, iframes, and scripting
  6. Reusing Previous Computation
    Invalidation, editing, and correctness
Read Entire Article