adrian Posted September 12, 2019 Share Posted September 12, 2019 https://web.dev/native-lazy-loading/ 6 Link to comment Share on other sites More sharing options...
louisstephens Posted September 12, 2019 Share Posted September 12, 2019 2 minutes ago, adrian said: https://web.dev/native-lazy-loading/ Is there something wrong with the site? The url does not seem to work for me. Link to comment Share on other sites More sharing options...
adrian Posted September 12, 2019 Author Share Posted September 12, 2019 You probably have "dev" in your hosts file pointing to localhost. 5 Link to comment Share on other sites More sharing options...
louisstephens Posted September 12, 2019 Share Posted September 12, 2019 You are correct sir. Thanks for pointing that out! 1 Link to comment Share on other sites More sharing options...
horst Posted September 12, 2019 Share Posted September 12, 2019 That would be nice: Quote Native lazy loading also ensures that deferred loading of images and iframes still works even if JavaScript is disabled on the client. this -> "works if JavaScript is disabled" But how long will it take until all other browsers support it too? ;-) Link to comment Share on other sites More sharing options...
MoritzLost Posted September 12, 2019 Share Posted September 12, 2019 I think it's great! I've already incorporated it into my current project, and it has a sizable performance impact on Chrome without any real work on my part. I always thought removing the src attribute and setting it with JavaScript was an antipattern, as anyone with JavaScript disabled wouldn't see any images at all, so it's good to see native support for lazy loading. 1 hour ago, horst said: That would be nice: this -> "works if JavaScript is disabled" But how long will it take until all other browsers support it too? ? It's progressive enhancement, so you don't need to have support from all browsers. Support doesn't look half bad though, even though only Chrome supports it at the moment (see caniuse), that's already a sizable chunk of the population. Also, caniuse currently lists Chrome on Android, which is huge (36 %) as not supporting it, I'm not sure that's correct. According to the Chrome Platform Status page, native lazyload is already supported in Chrome on Android. That would get the feature to >50 % browser support already. On current Android versions, all WebViews are provided by Chrome, so it will work in all in-app browsers on Android as well. Also, you can very easily polyfill the native lazyload with JavaScript (see article above), so everyone will profit from this without much of a downside! 5 Link to comment Share on other sites More sharing options...
horst Posted September 13, 2019 Share Posted September 13, 2019 19 hours ago, MoritzLost said: It's progressive enhancement, so you don't need to have support from all browsers. Support doesn't look half bad though, even though only Chrome supports it at the moment (see caniuse), that's already a sizable chunk of the population. Also, caniuse currently lists Chrome on Android, which is huge (36 %) as not supporting it, I'm not sure that's correct. According to the Chrome Platform Status page, native lazyload is already supported in Chrome on Android. That would get the feature to >50 % browser support already. On current Android versions, all WebViews are provided by Chrome, so it will work in all in-app browsers on Android as well. Also, you can very easily polyfill the native lazyload with JavaScript (see article above), so everyone will profit from this without much of a downside! This sounds even better. I will read the linked article. If we really can use it and have polyfill fallback, we can let out lazyload libraries. That would/will be great. :) 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted September 13, 2019 Share Posted September 13, 2019 Just stumbled across this... 5 Link to comment Share on other sites More sharing options...
Recommended Posts