Re:In spite of an increase in Internet speed, webpage speeds...
by yoz-y on Tuesday August 04, 2020 @04:54PM
(#24054397)
I suppose simple order in the HTML document would be a heuristic that works almost always, but due to CSS the order is actually not guaranteed. You need to download images before doing the layout first too as you don’t know the sizes beforehand.
[ Parent
| on HN ]
Re:In spite of an increase in Internet speed, webpage speeds...
by Wowfunhappy on Tuesday August 04, 2020 @06:14PM
(#24055059)
It's not just CSS screwing up the order! On my own (simple) sites, I can see all the images I put on a page getting downloaded in parallel—with the end result being that pages with more images at the bottom load more slowly even above the fold.
Re:In spite of an increase in Internet speed, webpage speeds...
by Something1234 on Tuesday August 04, 2020 @05:54PM
(#24054898)
That's what the width and height attributes on the img tag are for. They're hints. Things can be redrawn later. Although I think I've been seeing a lot fewer images on the internet lately, but they must be hidden with css.
Re:In spite of an increase in Internet speed, webpage speeds...
by yoz-y on Wednesday August 05, 2020 @05:13AM
(#24058731)
I know. And I wish my static site generator of choice (Hugo) added the tags automatically to the HTML.
Would it be possible to download just the headers of images first to get the metadata?
Re:In spite of an increase in Internet speed, webpage speeds...
by Something1234 on Thursday August 06, 2020 @10:01AM
(#24070935)
It's still a decent amount of overhead to even make the request for those bytes.