-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy loading: use new HTML loading
attribute
#12512
Comments
If any other folks come to this issue, last week in Chrome 76 support for this attribute was introduced. There's a bug report for it in Firefox but no evidence yet that they're planning to work on it. |
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation. |
According to caniuse, Firefox is adding this support in version 75. They've closed the bug report, as well. Edge has also added it with their move to Chromium. |
Noting that this feature will be added to WordPress itself in version 5.5: Jetpack will consequently be updated accordingly. |
Noting that the feature just landed in Core, so we can start working with it:
|
Opening the conversation for how Jetpack should handle this moving forward. We add a JS-based solution that works in more places than the Should we check user agent and only run our solution on Safari and IE (the two major browsers that lack support)? That's not great for caching. Should we just drop our solution when running WP 5.5? Or something more robust where we add our solution, then with JS re-add the src tag if on a browser supporting the spec to lean back into browser based support? Personally, I lean toward the second since the relative number of users on an unsupported version will decrease quite a bit in the near future. |
I would also suggesting dropping our solution for sites running WordPress 5.5+. Once a third of the web starts supporting the cc @josephscott, who may know more and should be able to weigh in on the impact this would have. |
loading
attribute (eventually)loading
attribute
In terms of just the One of the challenges with the Jetpack could stop doing the |
Here is the related dev note with filters we can use: |
To keep this issue clean, I'm going to close it to defer to Core's implementation of adding the |
Evidently a new
loading
attribute is working its way through WHATWG into the HTML standard! It supportslazy
,eager
, andauto
. Sounds like it will allow basically the same thing as Jetpack's (and others') current JS-based lazy loading.Background:
https://addyosmani.com/blog/lazy-loading/
https://github.com/scott-little/lazyload
Support right now (May 2019) is approximately zero - https://caniuse.com/#feat=loading-lazy-attr - but will obviously grow. Consider this a placeholder for discussion if and when Jetpack wants to start using it in addition to (and maybe eventually instead of) the current JS implementation.
Thanks for everything you all do!
The text was updated successfully, but these errors were encountered: