Newshot

Web Browser Engineering

Original text(via Hacker News)

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

Buy Web Browser Engineering

Web Browser Engineering is available from Bookshop, B&N, and Amazon, or in translation in Korean (from Hanbit) and Japanese (from O’Reilly).

The cover for Web Browser Engineering in Korean, from Hanbit
The cover for Web Browser Engineering in Korean, from Hanbit
The cover for Web Browser Engineering in Japanese, from O’Reilly
The cover for Web Browser Engineering in Japanese, from O’Reilly

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.

Introduction

  • Browsers and the Web
  • History of the Web

Part 1: Loading Pages

  • Downloading Web Pages URLs and HTTP requests
  • Drawing to the Screen Creating windows and drawing to a canvas
  • Formatting Text Word wrapping and line spacing

Part 2: Viewing Documents

  • Constructing an HTML Tree Parsing and fixing HTML
  • Laying Out Pages Inline and block layout
  • Applying Author Styles Parsing and applying CSS
  • Handling Buttons and Links Hyperlinks and browser chrome

Part 3: Running Applications

  • Sending Information to Servers Form submission and web servers
  • Running Interactive Scripts Changing the DOM and reacting to events
  • Keeping Data Private Cookies and logins, XSS and CSRF

Part 4: Modern Browsers

  • Adding Visual Effects Blending, clipping, and compositing
  • Scheduling Tasks and Threads The event loop and the rendering pipeline
  • Animating and Compositing Smooth animations using the GPU
  • Making Content Accessible Keyboard input, zooming, and the accessibility tree
  • Supporting Embedded Content Images, iframes, and scripting
  • Reusing Previous Computation Invalidation, editing, and correctness

Conclusion

  • What Wasn’t Covered
  • A Changing Landscape

Appendix

  • Bibliography
  • About the Authors
  • Contributors
  • List of courses taught from this book
  • One-page version

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Hacker News
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗