WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
https://wordpress.org/plugins/performance-lab/
GNU General Public License v2.0
340 stars 91 forks source link

Lazy load embeds with facades #1299

Open asafm7 opened 4 weeks ago

asafm7 commented 4 weeks ago

Was this considered?

https://developer.chrome.com/docs/lighthouse/performance/third-party-facades/

westonruter commented 4 weeks ago

The problem is that there is a very bad UX problem with façades, specifically for video. On mobile they require a second tap to play. See https://github.com/paulirish/lite-youtube-embed/issues/6

asafm7 commented 4 weeks ago

Interesting, @westonruter. Thanks.

I have my own implementation that I thought was working but now I see isn't auto-playing on iOS.

BTW, it might be worth mentioning in the plugin's description how what it does is different (and better) than just adding loading="lazy" to the iframe.

westonruter commented 4 weeks ago

BTW, it might be worth mentioning in the plugin's description how what it does is different (and better) than just adding loading="lazy" to the iframe.

@asafm7 Well, that is what it does if the embed merely consists of an iframe. If there are scripts too then it will do additional work to delay loading them.