Web Fundamentals
Web Browsers

Ruben Taelman, Ghent Universityimec

Web Fundamentals
Web Browsers

Ruben Taelman

Ghent University imec IDLab

Creative Commons License Except where otherwise noted, the content of these slides is licensed under a Creative Commons Attribution 4.0 International License.

[An early screenshot of the Nexus browser.]
©2016 W3C
[Typical user interface of a modern browser.]

A deep dive into Web browsers

Web Fundamentals
Web Browsers

Web Fundamentals
Web Browsers

Web Fundamentals
Web Browsers

1989: Tim Berners-Lee spawned the World Wide Web

1990: The first Web Browser is released

[An early screenshot of the Nexus browser.]
©2016 W3C

1992: More browsers are released

1993: Even more browsers are released

Web Fundamentals
Web Browsers

There are two ages of the Internet—before Mosaic, and after.


In twenty-four months, the Web has gone from being unknown to absolutely ubiquitous.

Mark Pesce, ZDNet
[Icon of the Mosaic browser.]

1993 - 1994: Domination of Mosaic

[Icon of the Netscape browser.]

1994 - 1995: Rise of Netscape

Web Fundamentals
Web Browsers

[Icon of the Internet Explorer browser.]

1995: Microsoft awakens

1995 - 2001: Rapid development of new features

[Best-view-with icons.]

De-standardization

[Giant IE logo is placed in front of Netscape office upon IE 4.0 launch.]
©2016 Stefan Baumgartner
[Netscape employees knock it over, and place their Mozila mascot on it. The sign reads: Netscape 72%, Microsoft 18%]
©1997 John Francis Stracke

2001: Dominance of Internet Explorer

Web Fundamentals
Web Browsers

[Safari icon.]

2003: Apple releases Safari

[Firefox icon.]

2004: Mozilla Foundation releases Firefox

[Opera icon.]

2005: Opera becomes freeware

Full of features, easy to use, and a virtual engraved invitation to hackers and other digital delinquents, Internet Explorer 6.x might be the least secure software on the planet.

The 25 Worst Tech Products of All Time, Dan Tynan, PCWorld
[Internet Explorer 7 icon.]

2006: Internet Explorer 7 is released

[IE6/IE7 cartoon.]
©2009 John Martz
[The Acid2 test for testing spec-compliance.]
©2006 NetworkWorld
[Chrome icon.]

2008: Google releases Chrome

[First page of the Chrome release comic.]
©2008 Scott McCloud
[Flash icon.]

2010: Steve Jobs' Thoughts on Flash

[Chrome icon.]

Chrome quickly gains market share

Chrome Won

Andreas Gal, Former Mozilla CTO, 2017

Web Fundamentals
Web Browsers

[W3C logo.]

World Wide Web Consortium maintains Web standards

2004 - 2019: Competing Web standards

2019: Conflict ends

Web Fundamentals
Web Browsers

A Web dominated by Chrome

[Market share of browser engines.]
©2019 A. Eylenburg

Web Fundamentals
Web Browsers

Web Fundamentals
Web Browsers

[Typical user interface of a modern browser.]

What is happening under the hood?

The multi-process browser architecture

Browser process
handles the user interface
Render process(es)
handles rendering of a single tab
Plugin process(es)
plugins inside websites (e.g. Flash)
GPU process
Handles GPU tasks

Impact of multiple processes

[Chrome's multi-process architecture.]
©2018 Mariko Kosaka

Site Isolation

Towards Servicification

Web Fundamentals
Web Browsers

Critical Rendering Path

Metrics for human-perceived load speed

Web Fundamentals
Web Browsers

DOM: Document Object Model

[Steps for constructing the DOM.]
©2019 Ilya Grigorik

JavaScript can block DOM parsing

Preload scanner for subresources

Web Fundamentals
Web Browsers

CSSOM: CSS Object Model

[Example of a constructed CSSOM.]
©2019 Ilya Grigorik

CSS is a render blocking resource

Web Fundamentals
Web Browsers

Render Tree combines DOM and CSSOM

Constructing the Render Tree

[Example of a Render Tree.]
©2019 Ilya Grigorik

Web Fundamentals
Web Browsers

Layout Stage (=reflow) computes positions

[Example of input to the layout stage.]
©2019 Ilya Grigorik

Web Fundamentals
Web Browsers

Painting Stage converts to pixels on screen

Compositing splits page into layers

Compositing marks Non-fast Scrollable Regions

[A fully rendered and interactive Web page.]

Web Fundamentals
Web Browsers

Web Fundamentals
Web Browsers

Dynamicity for Web pages with JavaScript

[Logo of JavaScript.]

Example: handle button clicks

document.getElementsByTagName('button')[0]
  .addEventListener('click', () => {
    console.log('Clicked!');
  });

Standardized as ECMAScript (ECMA-262)

TC39 committee works on ECMAScript

[Logo of TC39.]

Web Fundamentals
Web Browsers

Engines process the macrotask queue

[Example of the Macrotask queue.]
©2023 Ilya Kantor
[Stack, Heap, and Queue.]
©2023 MDN

Microtasks run before macrotasks

Task scheduling impacts performance

[Example of the Macrotask and Microtask queues.]
©2023 Ilya Kantor

Web Fundamentals
Web Browsers

JavaScript engines execute JavaScript code

[Spidermonkey icon.]

Spidermonkey is the engine in Firefox

[V8 icon.]

V8 is the engine in Chromium

[WebKit icon.]

JavaScriptCore is the engine in WebKit

More JavaScript engines

Web Fundamentals
Web Browsers

Web Fundamentals
Web Browsers

Browser APIs expose browser and system capabilities

Web Workers enable multi-threaded JavaScript

Web Storage enables data persistence

WebAssembly for low-level code execution

WebGL exposes GPU access

Web Fundamentals
Web Browsers

Beyond browser APIs with extensions

[Toolbars in browsers.]
©2016 Shailin Dhar

Web Fundamentals
Web Browsers