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

629 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

When you open a webpage, it’s like opening up a book and putting each page on a table. Even if the book isn’t very big, you need a big table to spread out each individual page so you can see everything clearly. Web pages have many things going on at one time – pictures, videos, animations, html5 things, not to mention they need to remember things you’ve clicked on in the past, and maybe things like what you submitted in a form. ALL of these things need a degree of memory to work correctly, just like you need space on a table to spread out the pages from that book.

So even if a single web page source isn’t big, it needs extra memory to handle all the things that can be happening on that page, and to make sure everything runs smoothly.

Edit: A lot of code written today is done so using existing code most of which isn’t used. There’s still a lot of waste. I’d encourage you to watch the “30 million line problem” on youtube when you’re older.

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