- From: Simon Pieters <simonp@opera.com>
- Date: Tue, 25 Jun 2013 17:56:03 +0200
- To: public-web-perf@w3.org
https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html says [[ The lazyload attribute can be specified on the following HTML elements capable of fetching resources: audio embed iframe img link object script svg video ]] Please remove all elements except img. As far as I know, the stated use case that the lazyload attribute is intended to address is only about images. The solution should focus on addressing the stated use case and not immediately feature creap to everything you can think of. Let's have a brief look at whether having lazyload makes sense on the listed elements: audio video These already have the preload="" attribute to control loading. The states are "auto", "metadata" and "none". On the face of it, it seems reasonable to also support "lazy" where it acts like "none" if the element is outside the viewport and "metadata" or "auto" if it's visible or is soon about to be visible. However, I think it would be better to start small and wait until the lazyload attribute has proven its merits on the img element before extending it to media elements. embed iframe object These can create nested browsing contexts. It seems like it would cause various complications if these can be lazy-loaded. They are complicated as it is. link It has been proposed that an attribute be added to stylesheet link to not block execution of scripts. However, the spec doesn't address that. "lazyload" also seems like the wrong semantic -- a link element is always invisible, and the proposed attribute is more like <script async> i.e. fetch now but don't block scripts. script This already has means to control when the script is executed (async and defer). Since scripts are invisible, lazyload seems like the wrong semantic. If the author wishes to load a script at a certain point, that is possible by creating and inserting a script at that point. svg This doesn't even fetch anything. -- Simon Pieters Opera Software
Received on Tuesday, 25 June 2013 15:54:20 UTC