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

7 points by rajnathani ↗ HN
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.

3 comments

[ 3.1 ms ] story [ 14.6 ms ] thread
My wild guess would be 20% smaller. Css, layout, rendering, images, video, audio, etc still huge.
It might become significantly smaller if some network and IO features which are not accessible w/o JS will go away reducing the browser to pdf reader with forms and GET requests.
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.