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.
Latest Answers