why do web browsers use so much ram, while the average size of an entire webpage is 2mb?

748 views

From what I understand, one could cache 100 web pages (obviously, 2mb is average, but there are much smaller and much larger than that) in about 200mb. 1GB could cache literally 500 web pages.

How come web browsers use so much ram then?

In: 3000

25 Answers

Anonymous 0 Comments

The HTML and JS scripts might just be a few megabyte, but those are just instructions that have to be converted to something useful first. The HTML needs to create the Document Object Model and the Javascript gets compiled to executable machine code. The JS code will also fetch data from an endpoint and create more in-memory objects.

If you use your browsers development tools and take a look at the heap memory you’ll see that this empty thread already uses like 100 MB in total.

You are viewing 1 out of 25 answers, click here to view all answers.