21 ms·
Loading images as soon as they are within viewport is already too late. You want to load them before user gets there. So you could just not mess up with native
by hawski 9y ago
Loading images as soon as they are within viewport is already too late. You want to load them before user gets there. So you could just not mess up with native browser loading in the first place. Because all those requests and client side calculations will add up.
When you have image heavy content please load an image when I'm one or two page heights before the image. This way when I get there it will already be there. You could then just use regular single background placeholders, because I (and I would believe that you also) never intend to see them in the first place.