- From: Jake Archibald <jakearchibald@chromium.org>
- Date: Tue, 28 May 2013 10:39:07 +0100
- To: Jatinder Mann <jmann@microsoft.com>
- Cc: James Simonsen <simonjam@google.com>, Jake Archibald <jakearchibald@chromium.org>, "public-web-perf@w3.org" <public-web-perf@w3.org>
- Message-ID: <CAPy=JoogWjbPjuFoj1F8_5Chcj9KMpL5Xxegu3u6qdjz3sXAOg@mail.gmail.com>
Liking this a lot! With script elements, we should specify that 'lazyload' extends the properties of 'async', in that it behaves exactly the same but with a lower priority download. This means it implicitly gets precedence over 'defer', and we don't have to define execution order in relation to other scripts. This also means the attribute is ignored if the script has no src. What are we doing with SVG elements? They don't have an external src, so there's nothing to defer. We could defer all resources triggered by the svg element, but that sounds confusing. We could add the attribute to svg elements that trigger a request (<image> or example), but I don't think we need that for the first version of this spec. External svg is linked to using <img> & <object> and we've already got that covered. In terms of viewport & visibility-based loading, we should specify that this only applies to elements that have, by default, physical page presence. I'm not sure what the spec-language is for that. But, we don't want to block downloading <script> & <link> that are display:none, as they always are. Same for <audio> without controls. On Thu, May 23, 2013 at 11:37 PM, Jatinder Mann <jmann@microsoft.com> wrote: > Great. I’ve updated the spec draft [1] to change ‘delayload’ to > ‘lazyload’ and have clarified that the load event of the element with > ‘lazyload’ must continue to be delayed until the resource is loaded.**** > > ** ** > > I also added a clarification that if a script element has both the ‘defer’ > and ‘lazyload’ attributes specified, the ‘lazyload’ attribute must take > precedence. **** > > ** ** > > Thanks,**** > > Jatinder**** > > ** ** > > [1] > https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html > **** > > ** ** > > *From:* James Simonsen [mailto:simonjam@google.com] > *Sent:* Thursday, May 23, 2013 3:00 PM > *To:* Jatinder Mann > *Cc:* Jake Archibald; public-web-perf@w3.org > > *Subject:* Re: <img src="..." defer>**** > > ** ** > > On Thu, May 23, 2013 at 2:32 PM, Jatinder Mann <jmann@microsoft.com> > wrote:**** > > > 'delayload' as in 'delay the load' sounds like the image may delay > the loading of the page, when (in terms of the load event of the document) > it does the opposite.**** > > **** > > I think you have a good point here. ‘delayload’ delays downloading the > resource but does not delay the window load event is confusing. ‘lazyload’ > does seem to not have that problem and may be a more well understood term > (for what it’s worth, it has a Wikipedia page: > http://en.wikipedia.org/wiki/Lazy_loading).**** > > **** > > What do folks think of the ‘lazyload’ term?**** > > ** ** > > I prefer it over the previous suggestions.**** > > **** > > I also think the spec should be clear that using this attribute will > mean that this resource will not block the load event for the window, but > will continue to block the load event for itself.**** > > ** ** > > Definitely.**** > > ** ** > > James **** >
Received on Tuesday, 28 May 2013 09:39:38 UTC