HACKER Q&A
📣 rajnathani

Approximately what percent smaller would a non-JS/WASM web browser be?


The question is in regarding the lines of code / binary size, of the output subset web browser.

Essentially it comes down to just a modern HTML + CSS standards rendering engine.


  👤 asadotzler Accepted Answer ✓
SpiderMonkey in Gecko is probably about 3.5 million lines of code. Gecko, the web engine that SpiderMonkey is a part of is about 12 million lines I think, and the front end for Firefox brings the total near 20 million lines. This is all dated info from when I last looked maybe a decade ago but I think it's directionally correct and roughly similar to Chrome.

So, one might save about 35% or so of the browser's code by stripping out JS and any other bits that are there exclusively for JS in the DOM and elsewhere.


👤 postalrat
My wild guess would be 20% smaller. Css, layout, rendering, images, video, audio, etc still huge.