vannilla wrote: ↑2023-02-11, 22:51
Consider that to read an article on Medium, a platform for written content and the occasional companion picture, requires megabytes of scripts.
Why do you even need scripts to display text and pictures?
You literally don't. You
can, but that's the old adage "Just because you can doesn't mean you should".
With HTML and CSS3, you literally don't need
any JS to display rich content like Medium publishes in any shape or form, including in fully-responsive layouts.
Also, a lot of people don't seem to understand how much code several
megabytes of JS is, especially if those megabytes of code are minified (as they normally are).
If you take a reasonable average of 40 lines of code for 1kB of file size (non-minified), then 1 MB is ~41,000 lines of code. That's almost 900! pages of a standard layout book size. Of just code. And that's just 1 MB. These sites are often >10 MB of scripting, minified. Then keep in mind that all of that scripting needs to be parsed, interpreted and compiled. It is totally bananas if you understand the scope of what's going on.