Skip to product information
A web browser from scratch
A web browser from scratch
Description
Book Introduction
Web Browser! Build, Unpack, Understand
Understanding How the Web Works, Step by Step


Web browsers like Chrome, Firefox, Brave, and Whale may look simple on the outside, but they actually have as many as 10 million lines of code hidden underneath.
This book provides a clear and easy-to-understand explanation of how web browsers actually work and how their structure and principles impact web developers and software engineers.

This book draws on the extensive experience and insights gained from designing real-world browsers by Pavel Pancheka, a professor at the University of Utah and web browser researcher, and Chris Harrelson, the rendering engine lead for Google Chrome. From DNS and HTTP requests to HTML parsing, screen rendering, interaction, and even the advanced features of modern browsers, you'll learn how to build your own browser using Python by following each chapter.
Even if you don't have much programming experience, if you follow this book and understand the core principles, you'll be able to personally witness the entire process of opening a web page on the Internet.

Target audience
● Web front-end developers who want to improve service performance
● Students who want to know the basic principles of networks and web browsers
● Beginner developers who want to create visible results with Python
  • You can preview some of the book's contents.
    Preview

index
PROLOGUE Browser and Me

PART 1 Page Loading

CHAPTER 1 Downloading Webpages
_1.1 Connecting to the Server
_1.2 Requesting Information
_1.3 Server response
_1.4 Telnet via Python
_1.5 Requests and Responses
_1.6 Displaying HTML
_1.7 Encrypted Connection
_1.8 Summary
_1.9 Practice Problems

CHAPTER 2 Drawing on the Screen
_2.1 Creating a window
_2.2 Drawing on the window
_2.3 Placing Text
_2.4 Scrolling text
_2.5 Faster rendering
_2.6 Summary
_2.7 Practice Problems

CHAPTER 3 Formatting Text
_3.1 What is a font (typeface)?
_3.2 Measuring Text
_3.3 Processing words one by one
_3.4 Styling text
_3.5 Layout Objects
_3.6 Text of various sizes
_3.7 Font Caching
_3.8 Summary
_3.9 Practice Problems

PART 2 Show Document

CHAPTER 4 Building the Document Tree
_4.1 Node Tree
_4.2 Building a Tree
_4.3 Debugging the parser
_4.4 Self-closing tag
_4.5 Using the Node Tree
_4.6 Handling Page Errors
_4.7 Summary
_4.8 Practice Problems

CHAPTER 5 PAGE LAYOUT
_5.1 Layout Tree
_5.2 Block Layout
_5.3 Size and location
_5.4 Recursive Painting
_5.5 Drawing the background
_5.6 Summary
_5.7 Practice Problems

CHAPTER 6: APPLYING DEVELOPER STYLE
_6.1 Parsing using functions
_6.2 style attribute
_6.3 Selector
_6.4 Applying a style sheet
_6.5 Cascading
_6.6 Inherited Styles
_6.7 Font Properties
_6.8 Summary
_6.9 Practice Problems

CHAPTER 7 Handling Buttons and Links
_7.1 Where is the link?
_7.2 Line Layout
_7.3 Click Processing
_7.4 Tabbed Browsing
_7.5 Browser Chrome
_7.6 History Exploration
_7.7 Enter URL
_7.8 Summary
_7.9 Practice Problems

PART 3 Running the Application

CHAPTER 8 Sending Information to the Server
_8.1 How the form works
_8.2 Rendering widgets
_8.3 Interacting with Widgets
_8.4 Submitting the form
_8.5 Web App Behavior
_8.6 Receiving POST requests
_8.7 Creating a Web Page
_8.8 Summary
_8.9 Practice Problems

CHAPTER 9 Running Interactive Scripts
_9.1 Installing DukPy
_9.2 Running JavaScript Code
_9.3 Exporting functions
_9.4 Handling Crashes
_9.5 Returning a Handle
_9.6 Handle Wrapping
_9.7 Event Handling
_9.8 Modifying the DOM
_9.9 Event Defaults
_9.10 Summary
_9.11 Practice Problems

CHAPTER 10 Protecting User Data
_10.1 Cookies
_10.2 Login System
_10.3 Implementing Cookies
_10.4 Cross-site requests
_10.5 Same-origin policy
_10.6 Cross-Site Request Forgery
_10.7 SameSite Cookies
_10.8 Cross-Site Scripting
_10.9 Content Security Policy
_10.10 Summary
_10.11 Practice Problems

PART 4 ​​Modern Browser Features

CHAPTER 11 VISUAL EFFECTS
_11.1 Installing Skia and SDL
_11.2 Creating a window using SDL
_11.3 Surfaces and Pixels
_11.4 Rasterization with Skia
_11.5 Browser Compositing
_11.6 Transparency
_11.7 Blending and Stacking
_11.8 pixel composite
_11.9 Clipping and Masking
_11.10 Optimizing Surface Usage
_11.11 Summary
_11.12 Practice Problems

CHAPTER 12 Task and Thread Scheduling
_12.1 Tasks and Task Queues
_12.2 Timers and setTimeout
_12.3 Long-lived threads
_12.4 Rendering Cycle
_12.5 Optimization via dirty bits
_12.6 Frame Animation
_12.7 Rendering Profiling
_12.8 Two threads
_12.9 Committing the display list
_12.10 Thread Profiling
_12.11 Thread-based scrolling
_12.12 Thread-based styles and layouts
_12.13 Summary
_12.14 Practice Problems

CHAPTER 13 ANIMATION AND COMPOSITION
_13.1 JavaScript Animation
_13.2 GPU acceleration
_13.3 Compositing
_13.4 Compositing Leaf Node
_13.5 CSS Transitions
_13.6 Composite Animation
_13.7 Compositing Optimization
_13.8 Overlap and Transform
_13.9 Summary
_13.10 Practice Problems

CHAPTER 14 IMPROVING CONTENT ACCESSIBILITY
_14.1 What is accessibility?
_14.2 Zoom
_14.3 Dark Mode
_14.4 Customizing Dark Mode
_14.5 Keyboard Navigation
_14.6 Focus indicator
_14.7 Accessibility Tree
_14.8 Screen Reader
_14.9 Accessibility Notice
_14.10 Interaction through voice and vision
_14.11 Summary
_14.12 Practice Problems

CHAPTER 15 Support for Embedded Content
_15.1 Image
_15.2 Embedded Layout
_15.3 Image size correction
_15.4 Interactive Widgets
_15.5 iframe rendering
_15.6 iframe input event
_15.7 iframe script
_15.8 Interframe Communication
_15.9 Isolation and Timing
_15.10 Summary
_15.11 Practice Problems

CHAPTER 16 Reusing Previous Results
_16.1 Editing Content
_16.2 Why is it invalid?
_16.3 Idempotency
_16.4 Dependencies
_16.5 Protected Fields
_16.6 Recursive Invalidation
_Protecting 16.7 width
_16.8 width for inline elements
_16.9 Invalidating layout fields
_16.10 Protecting Inline Layout
_16.11 Skip updates that don't change
_16.12 Skip Navigation
_16.13 Invalidating fine-grained styles
_16.14 Analyzing Dependencies
_16.15 Summary
_16.16 Practice Problems

CHAPTER 17 What's Not Covered in This Book
_17.1 Executing JavaScript
_17.2 Text & Graphics Rendering
_17.3 Connection Security and Privacy
_17.4 Network Caching and Media
_17.5 A more stylish layout mode
_17.6 Browser UI and Developer Tools
_17.7 Test

EPILOGUE A Changing Environment

Detailed image
Detailed Image 1

Publisher's Review
Unraveling the Hidden Mechanisms of Web Browsers Piece by Piece

Google Chrome, Firefox, Edge...
The web browser we use today contains at least 10 million lines of code! Now is the opportunity to delve into the "hidden inner workings" of this complex and massive web browser.
This book is a unique guide that clearly explains the workings of browsers, which still remain unknown territory for many web developers and students.

Go beyond simple theoretical learning and learn from the ground up by writing your own web browser with Python code.
Starting with simple functions, you can build them piece by piece to delve into the workings of a massive, real-world web browser.


Create your own browser, guided by authors and translators who have worked on the development of real web browsers.

Contents of this book

● The entire process of displaying a website, from page loading to rendering
● Understanding the architecture of modern browsers such as Chrome, Firefox, and Whale
● Security and performance optimization
● Web standards and software engineering thinking
● Accessibility and visual effects
GOODS SPECIFICS
- Date of issue: September 15, 2025
- Page count, weight, size: 632 pages | 183*235*24mm
- ISBN13: 9791169214353
- ISBN10: 1169214355

You may also like

카테고리