Then I kinda wonder why loading="lazy" isn't the default behavior for browsers (those that support it). It sounds like it's the way to go in 99% of the cases. And for the rest of the cases, you set loading="eager" or whatever is appropriate to overwrite default behavior.
it is costly for browsers to calculate the current position of each image and cross-reference the scrollbar data, in addition to doing such a thing they would break various image-based tracker mechanisms
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
Then I kinda wonder why
loading="lazy"
isn't the default behavior for browsers (those that support it). It sounds like it's the way to go in 99% of the cases. And for the rest of the cases, you setloading="eager"
or whatever is appropriate to overwrite default behavior.it is costly for browsers to calculate the current position of each image and cross-reference the scrollbar data, in addition to doing such a thing they would break various image-based tracker mechanisms
That second part sounds like a net win to me.