Chrome vs. Everybody

Dated May 19, 2020; last modified on Sun, 12 Feb 2023

Browser Market Share Worldwide (2009 - 2020). Source: [statcounter | GlobalStats](#browserShare20092020)
Browser Market Share Worldwide (2009 - 2020). Source: [statcounter | GlobalStats](#browserShare20092020)

At the very least, Chrome is worth studying. Something worked out. I’m biased, I only plan to deeply explore Chromium-based browsers and Firefox.

Stability, Testing and the Multi-Process Architecture

In a single-threaded browser, devs use asynchronous APIs - which may sometimes hold the browser up. Instead of multiple threads, Chromium chose multiple processes: isolation, independent crashes, better asymptotic memory management, identifying expensive sites, etc.

Google indexes a lot of web pages. The chrome bots test out millions of the most popular pages, reporting breaks before the builds reach users.

Firefox has been moving towards a more multi-process architecture. The main push seems to be security improvements by limiting the blast area.

Firefox Containers have gotten more PR, e.g. the Facebook Container as a line of defence against Big Bad Zuck! Data supported by originAttributes is fair game for containerization, e.g. cookies, localStorage, indexedDB, HTTP data cache, image cache (and in the future, history, bookmarks, and security exceptions). Passwords, search & form data, HSTS flags and OCSP responses will still be accessible cross-container. Admittedly, containers are more public facing and user-oriented, but they seem to offer no protection against process-wide attacks. Furthermore, containers can be added to Chromium, but will they?

In 2019, Chrome implemented Site Isolation, an architecture that locks each renderer process to documents from a single site and filters certain cross-site data from each [renderer] process. Previously, evil.com could load an iframe for bank.com and exploit vulnerabilities in the renderer process to steal sensitive information.

Interesting that in the “one-site-per-process” policy, site refers to the public suffix, ignoring subdomains. For instance, https://google.com and https://mail.google.com will probably land in the same process.

Speed: WebKit and V8

The WebKit Project is an OSS project by Apple composed of a rendering engine for HTML and CSS, a JS engine, and a high-level API for embedding the engine into browsers). Google forked it to create Blink, citing different multi-process architecture. Browsers on iOS are still required to use WebKit as their rendering engine.

V8 is the OSS JavaScript virtual machine by Google. It beats other JS engines by using hidden classes for [classless] objects that end up with the same properties, generating machine code instead of being interpreted, and exercising incremental garbage collection.

References

  1. Browser Market Share Worldwide (2009 - 2020). statcounter | GlobalStats. gs.statcounter.com .
  2. Google Chrome: I. Stability, Testing and the Multi-Process Architecture. www.google.com .
  3. Process Isolation in Firefox. Randell Jesup. mozilla.github.io .
  4. Site Isolation: Process Separation for Web Sites within the Browser. Charles Reis; Alexander Moshchuk; Nasko Oskov. www.usenix.org . www.chromium.org . 2019. ISBN: 978-1-939133-06-9 .
  5. Security/Contextual Identity Project/Containers. wiki.mozilla.org .
  6. Google Chrome: Speed: WebKit and V8. www.google.com .
  7. Comparison of Browser Engines. en.wikipedia.org .
  8. Google going its own way, forking WebKit rendering engine. Peter Bright. arstechnica.com . Apr 13, 2013.
  9. The Chromium Projects: Blink - Developer FAQ. www.chromium.org . 2013.