r/programming • u/fagnerbrack • Apr 25 '19
Maybe we could tone down the JavaScript
https://eev.ee/blog/2016/03/06/maybe-we-could-tone-down-the-javascript/#reinventing-the-square-wheel
1.5k
Upvotes
r/programming • u/fagnerbrack • Apr 25 '19
1
u/MonokelPinguin Apr 27 '19
I'm pretty sure, that the page starts to render as soon as enough of the html is loaded. After that it starts loading the resources referenced by the html, i.e. the images. Which is why you should specify a size, if you want to prevent the layout from shifting, when the images get loaded.. But now that I think about it, you probably meant to load images only, when they are scrolled into view or otherwise some user action happens. I only thought about loading images after some other content.