4 ms·
Instead of all the complexity and code and branch predication, how about just send the page and the images? If lazy loading is super important, the browser can
by WillPostForFood 3y ago
Instead of all the complexity and code and branch predication, how about just send the page and the images? If lazy loading is super important, the browser can lazy load and render off screen. Don't make thousands of solutions for thousands of platforms on the server side.
- quickthrower2 3y agoI agree but changing the world to that would be quite a fuss. But if that was already where we are at it would be better. But the JS as an Operating System per site ship has sailed.
- hn_throwaway_99 3y agoI don't understand your comment at all. Before the loading attribute on img, developers did have lots of custom solutions for lazy loading. A major point of lazy loading is to save resources on the server that would be wasted when serving an image that is never seen.
- WillPostForFood 3y agoI like the loading attribute, but it hasn't been supported in Safari until very recently, so the solution has had to be a bespoke server + javascript solution to please Google. Still think a better solution is for the browser to optimize what is "below the fold" and make the decision based on user preference (I want to load the whole page). And most importantly, Google shouldn't weigh in on how to implement pages.