A
A
Alexey Al2020-05-07 18:12:12
Frontend
Alexey Al, 2020-05-07 18:12:12

What's wrong with the youtube code?

Hello. I'm not a front-end developer and I know how to make up quite a bit.

Recently I saved the html code of YouTube video pages here and noticed this thing. One page weighs approximately 3.5 megabytes.
Of course, I understand that technologies are growing, developing and applications are becoming more complex, and more and more computer power is required. But I don’t understand why THIS should take 3.5 megabytes if it’s just a tabular layout with menus, videos, comments and a feed of suggested videos. Well, really, how is this justified? That's a huge amount of code! And this is without scripts, css, pictures and other body kit.
On the one hand, I see that people deliberately remove line breaks and extra spaces from their js / css code so that it loads faster, in order to speed up page loading as much as possible, they compress everything, server-side rendering suits. On the other hand - a simple (as it seems to me) layout page weighing 3.5 megabytes.
How is this justified?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2020-05-08
@Sanasol

stop counting the lines in the file where you uploaded hundreds of comments and everything.
In its raw form, there are 500-1000 lines of code initially. And then most of them are directly data about what needs to be shown on the page.
Everything else is drawn on the fly by the front as needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question