I think it makes sense to provide a CSS property to set the download priority on an element. I have updated the spec with a 'resource-priorities' CSS property that has the values 'normal', 'lazy-load', and 'postpone'. Here are a couple of examples of using this CSS rule: * { resource-priority: lazy-load; } div { resource-priority: normal; background-image: url(...); } li { list-style-image: url(...); resource-priority: postpone; } @font-face { font-family: HugeFont; src: url('really_big_font.ttf'); resource-priority: lazy-load; } Another solution would have been to create individual properties for each resource type that may be loaded. This could get complicated and you may have a long list. I'm not a big fan of this approach: Background-image -> background-image-priority Border-image-source -> border-image-source-priority Content -> content-priority Cursor -> cursor-priority Icon -> icon-priority List-style-image -> list-style-image-priority Src -> src-priority (this is for @font-face) Thanks, Jatinder -----Original Message----- From: Ivan Kotenkov [mailto:kotenkov@yandex-team.ru] Sent: Monday, September 16, 2013 4:43 AM To: public-web-perf@w3.org Subject: [ResourcePriorities] lazyload in CSS Hello! CSS stylesheets may reference additional resources - for example, background image and fonts. Was adding the lazyload/postpone functionality(by adding properties to css, or by specifying lazyload/postpone for corresponding html elements) considered for them? -- Regards, Ivan KotenkovReceived on Saturday, 28 September 2013 01:02:43 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:01:21 UTC