Jump to content

Chrome's Native Lazy Loading now live


asigno

Recommended Posts

It's only a beta feature (i.e. it's hidden behind a special flag you have to manually enable) in Chrome 76, which was released 13 days ago.

I think we need to give a little time for this to mature first, but definitely when it does I think moving to natively supported browser functionality where possible would make sense.

Link to comment
Share on other sites

1 hour ago, bfarber said:

It's only a beta feature (i.e. it's hidden behind a special flag you have to manually enable) in Chrome 76, which was released 13 days ago.

No, it's live in all browsers based on chromium 76+. Caniuse just didn't updated their info yet. Test it yourself, it works in latest stable chrome by default.

Link to comment
Share on other sites

https://web.dev/native-lazy-loading

image.png

Admittedly I haven't tested it, I was going directly by the documentation on the very website you linked to. Perhaps this sentence means prior to 76 you had to enable the flags, and if so that's great that it's out "stable" now. Still, if no other browsers support the functionality, and Chrome only began supporting this functionality 13 days ago, it's probably worth giving the feature some time to mature before jumping on it. ;) 

Link to comment
Share on other sites

14 hours ago, bfarber said:

it's probably worth giving the feature some time to mature before jumping on it. ;) 

It will be mature enough when next Invision Community will be released ;)

Personally i would love to have this feature in IC as soon as possible, because ~83% of my users are using chromium-based browsers, and most of them are on up-to-date versions. It's good enough value for giving them this native feature and use IPS's implementation as Polyfill for other small group of users.

Link to comment
Share on other sites

UserPhoto template... these changes will ad it for basic user photos across the suite.  In post images are TBD on updating...

{{if $member->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}}
{{$memberURL = ( $warningRef ) ? $member->url()->setQueryString( 'wr', $warningRef ) : $member->url();}}
	<a href="{$memberURL}" {{if $hovercard}}data-ipsHover data-ipsHover-target="{$memberURL->setQueryString( 'do', 'hovercard' )}"{{endif}} class="ipsUserPhoto ipsUserPhoto_{$size}{{if $classes}} {$classes}{{endif}}" title="{lang="view_user_profile" sprintf="$member->name"}">
		<img src='{$member->photo}' loading='lazy' alt='{$member->name}'>
	</a>
{{else}}
	<span class='ipsUserPhoto ipsUserPhoto_{$size} {{if $classes}}{$classes}{{endif}}'>
		<img src='{$member->photo}' loading='lazy' alt='{$member->name}'>
	</span>
{{endif}}

 

Link to comment
Share on other sites

  • 4 months later...
5 hours ago, bfarber said:

We use a custom lazy loading solution, rather than the new built in lazy loading option Chrome provides. As time goes on and and the behavior is more widely adopted by other user agents, we will explore switching to the native option.

Chrome and FF both support it.  MS edge chromium engine will release on Jan 15th'ish. So about 60% of all web traffic is covered with loading=lazy right there (until safari adapts it). 

In addition, loading=lazy works intelligently in combination with traditional lazy loading scripts (they built it into the browser engine).  You actually get even better performance when using BOTH.   There's zero downside to including that attribute on all images and iframes in addition to the javascript version. You get the best of both worlds. 

Link to comment
Share on other sites

  • 2 months later...

Well, it now supported in all popular browsers:

  1. all current chromium-based browsers (Chrome, Edge, Opera, Yandex, etc).
  2. the future release of Firefox (75, will be released in less than a month).

These browsers are covering more than 94% of traffic on my websites, so I already implemented native lazy loading on some of them. And it works just great :smile:

Edited by Mr 13
Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...