Intent to Implement: Feature Policy 'lazyload'

219 views
Skip to first unread message

Ehsan Karamad

unread,
Aug 10, 2018, 2:06:34 PM8/10/18
to blink-dev
Contact emails
Allows developers to selectively control the use of "lazyload" attribute on <iframe> and <img> through the Feature-Policy HTTP header or the <iframe> "allow" attribute. The identifier for the feature in policies is "lazyload". By default, the feature is set to "auto" for all domains which would leave the current lazyload behavior unaltered (that is, the value of lazyload attribute on the element is used unless the attribute is undefined in which case user agent decides the behavior). This feature enables the developers to enforce lazyloading to all nested frames and images in owned or any embedded content. The result of this is potential overall reduction in load times.
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: Positive None.
None.
Yes.
https://crbug.com/869492 https://www.chromestatus.com/features/5641405942726656

PhistucK

unread,
Aug 10, 2018, 5:56:11 PM8/10/18
to ekar...@chromium.org, blink-dev
> the value of lazyload attribute on the element
It sounds like you imply that Chrome supports the lazyload attribute, but I have not found any evidence that it is supported using this search -

I mean, lazy loading is mentioned and is applied when <script src="..." async> is declared, but there is no supported behavior-changing attribute named lazyload.
(Internet Explorer did introduce it at some point, but no other browser supported it. Except Edge, but it is just an evolution of Internet Explorer)

References -


PhistucK


On Fri, Aug 10, 2018 at 9:06 PM Ehsan Karamad <ekar...@chromium.org> wrote:
Contact emails

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPN64a49CSBNRkO%2Bxfu_ZpeySy8uTeTTH7xhS8w7Y4R%3Dcd2jxg%40mail.gmail.com.

Scott Little

unread,
Aug 10, 2018, 6:53:12 PM8/10/18
to PhistucK, ekar...@chromium.org, blink-dev
On Fri, Aug 10, 2018 at 2:56 PM PhistucK <phis...@gmail.com> wrote:
> the value of lazyload attribute on the element
It sounds like you imply that Chrome supports the lazyload attribute, but I have not found any evidence that it is supported using this search -

FYI, the "lazyload" attribute in question here is part of the LazyLoad feature. I'm working on adding support for the "lazyload" attribute in Blink right now, it should be landed very soon.
 


I mean, lazy loading is mentioned and is applied when <script src="..." async> is declared, but there is no supported behavior-changing attribute named lazyload.
(Internet Explorer did introduce it at some point, but no other browser supported it. Except Edge, but it is just an evolution of Internet Explorer)

References -


PhistucK


On Fri, Aug 10, 2018 at 9:06 PM Ehsan Karamad <ekar...@chromium.org> wrote:
Contact emails
Allows developers to selectively control the use of "lazyload" attribute on <iframe> and <img> through the Feature-Policy HTTP header or the <iframe> "allow" attribute. The identifier for the feature in policies is "lazyload". By default, the feature is set to "auto" for all domains which would leave the current lazyload behavior unaltered (that is, the value of lazyload attribute on the element is used unless the attribute is undefined in which case user agent decides the behavior). This feature enables the developers to enforce lazyloading to all nested frames and images in owned or any embedded content. The result of this is potential overall reduction in load times.
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: Positive None.
None.
Yes.
https://crbug.com/869492 https://www.chromestatus.com/features/5641405942726656

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPN64a49CSBNRkO%2Bxfu_ZpeySy8uTeTTH7xhS8w7Y4R%3Dcd2jxg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

PhistucK

unread,
Aug 10, 2018, 7:44:18 PM8/10/18
to Scott Little, ekar...@chromium.org, blink-dev
Oh. Off topic, but I have not seen an intent to implement for the attribute. Since only Microsoft implemented it since 2013, I assumed it is dead. Do you know whether other browsers intend to support it?

PhistucK

Scott Little

unread,
Aug 10, 2018, 8:43:54 PM8/10/18
to PhistucK, ekar...@chromium.org, blink-dev
On Fri, Aug 10, 2018 at 4:44 PM PhistucK <phis...@gmail.com> wrote:
Oh. Off topic, but I have not seen an intent to implement for the attribute.

I sent out an intent to implement for the larger LazyLoad feature, and this 'lazyload' attribute is part of that.
 
Since only Microsoft implemented it since 2013, I assumed it is dead.

This is a different feature than that. See the intent to implement and design doc, and also the attribute spec proposal.
 
Do you know whether other browsers intend to support it?

We're planning to bring other browsers on board once we can demonstrate that LazyLoad yields significant benefits.

PhistucK

unread,
Aug 11, 2018, 8:51:18 AM8/11/18
to Scott Little, ekar...@chromium.org, blink-dev
Thank you for the clarification. I control + F "attribute" in that thread and could not find anything that mentions the addition of that attribute, so I thought it was not part of it.

By the way, you should probably either add an explicit ChromeStatus entry for that attribute, or make the fact that the lazy load feature includes that attribute more prominent in the existing feature entry (if there is one at all).
This will help caniuse.com, technical writers and others be more current with the state of the feature.

Interestingly, when MSDN switched to MDN, they did not port over the lazyload attribute reference. But perhaps only the JavaScript documentation was switched, so it might not reflect future plans of deprecating/removing support for that attribute...

PhistucK

EhsanK

unread,
Aug 13, 2018, 12:39:44 AM8/13/18
to blink-dev, phis...@gmail.com, ekar...@chromium.org
As Scott mentioned this feature policy is on top of the lazyload feature and I admit the I


On Friday, August 10, 2018 at 6:53:12 PM UTC-4, Scott Little wrote:


On Fri, Aug 10, 2018 at 2:56 PM PhistucK <phis...@gmail.com> wrote:
> the value of lazyload attribute on the element
It sounds like you imply that Chrome supports the lazyload attribute, but I have not found any evidence that it is supported using this search -
FYI, the "lazyload" attribute in question here is part of the LazyLoad feature. I'm working on adding support for the "lazyload" attribute in Blink right now, it should be landed very soon.
 
  Ins't lazyload for frames (LazyFrameLoading) implemented though? I though the image is the only part remaining. Also thanks for the bug link I am blocking the feature policy bug on it.


I mean, lazy loading is mentioned and is applied when <script src="..." async> is declared, but there is no supported behavior-changing attribute named lazyload.
(Internet Explorer did introduce it at some point, but no other browser supported it. Except Edge, but it is just an evolution of Internet Explorer)

References -


PhistucK


On Fri, Aug 10, 2018 at 9:06 PM Ehsan Karamad <ekar...@chromium.org> wrote:
Contact emails
Allows developers to selectively control the use of "lazyload" attribute on <iframe> and <img> through the Feature-Policy HTTP header or the <iframe> "allow" attribute. The identifier for the feature in policies is "lazyload". By default, the feature is set to "auto" for all domains which would leave the current lazyload behavior unaltered (that is, the value of lazyload attribute on the element is used unless the attribute is undefined in which case user agent decides the behavior). This feature enables the developers to enforce lazyloading to all nested frames and images in owned or any embedded content. The result of this is potential overall reduction in load times.
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: Positive None.
None.
Yes.
https://crbug.com/869492 https://www.chromestatus.com/features/5641405942726656

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Dale Curtis

unread,
Aug 17, 2018, 1:30:20 AM8/17/18
to EhsanK, blink-dev, phis...@gmail.com
Great proposal. We've been trying to do something like this at a lower level for media elements automatically for a while now; nominally avoiding pipeline creation for elements with a poster and stopping after metadata is available.

Always stopping at metadata for offscreen, paused elements or video only elements should be a huge resource savings. As a starter having an attribute like this would be immensely useful to sites with lots of media content. For media we'd probably want it to also imply something like 'lazyunload' too.

I'm happy to provide time from my team to expand or create an alternate proposal building off this work for media elements. 

- dale
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/8050c788-eb1c-4a11-9da5-cbb6d39ea0d9%40chromium.org.

Ben Greenstein

unread,
Aug 17, 2018, 12:59:45 PM8/17/18
to Dale Curtis, EhsanK, blink-dev, phis...@gmail.com
Dale, that sounds great! Let's talk. I was hoping to expand to media elements after we get the initial feature off the ground.

On Thu, Aug 16, 2018 at 10:30 PM Dale Curtis <dalec...@chromium.org> wrote:
Great proposal. We've been trying to do something like this at a lower level for media elements automatically for a while now; nominally avoiding pipeline creation for elements with a poster and stopping after metadata is available.

Always stopping at metadata for offscreen, paused elements or video only elements should be a huge resource savings. As a starter having an attribute like this would be immensely useful to sites with lots of media content. For media we'd probably want it to also imply something like 'lazyunload' too.

I'm happy to provide time from my team to expand or create an alternate proposal building off this work for media elements. 

- dale

On Sunday, August 12, 2018, EhsanK <ekar...@chromium.org> wrote:
As Scott mentioned this feature policy is on top of the lazyload feature and I admit the I

On Friday, August 10, 2018 at 6:53:12 PM UTC-4, Scott Little wrote:


On Fri, Aug 10, 2018 at 2:56 PM PhistucK <phis...@gmail.com> wrote:
> the value of lazyload attribute on the element
It sounds like you imply that Chrome supports the lazyload attribute, but I have not found any evidence that it is supported using this search -
FYI, the "lazyload" attribute in question here is part of the LazyLoad feature. I'm working on adding support for the "lazyload" attribute in Blink right now, it should be landed very soon.
 
  Ins't lazyload for frames (LazyFrameLoading) implemented though? I though the image is the only part remaining. Also thanks for the bug link I am blocking the feature policy bug on it.


I mean, lazy loading is mentioned and is applied when <script src="..." async> is declared, but there is no supported behavior-changing attribute named lazyload.
(Internet Explorer did introduce it at some point, but no other browser supported it. Except Edge, but it is just an evolution of Internet Explorer)

References -


PhistucK


On Fri, Aug 10, 2018 at 9:06 PM Ehsan Karamad <ekar...@chromium.org> wrote:
Contact emails
Allows developers to selectively control the use of "lazyload" attribute on <iframe> and <img> through the Feature-Policy HTTP header or the <iframe> "allow" attribute. The identifier for the feature in policies is "lazyload". By default, the feature is set to "auto" for all domains which would leave the current lazyload behavior unaltered (that is, the value of lazyload attribute on the element is used unless the attribute is undefined in which case user agent decides the behavior). This feature enables the developers to enforce lazyloading to all nested frames and images in owned or any embedded content. The result of this is potential overall reduction in load times.
Firefox: No public signals Edge: No public signals Safari: No public signals Web developers: Positive None.
None.
Yes.
https://crbug.com/869492 https://www.chromestatus.com/features/5641405942726656

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CABc02_JeirEps0XDsJW86rYQ_mrhHUvUe%3Dssf2Tg%3Df93pmnV%3DQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPUDrweWZdFk9g_HfPTANYCXjdc3uRhtMDqdMj5F3v95--hBOg%40mail.gmail.com.

Jake Archibald

unread,
Aug 18, 2018, 5:46:35 AM8/18/18
to Scott Little, PhistucK, ekar...@chromium.org, blink-dev
Is the lazyload attribute shipping? I can't find the intent to ship.

PhistucK

unread,
Aug 18, 2018, 7:47:49 AM8/18/18
to Jake Archibald, Scott Little, ekar...@chromium.org, blink-dev
No, it is being implemented, even though it was not obvious from the previous intent.

PhistucK

Reply all
Reply to author
Forward
0 new messages