Open Bug 1621411 Opened 8 months ago Updated 8 months ago

[rel=preload] Write set of tests for <link preload> and <img load="lazy"> to make sure the two feature don't break each other.

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

People

(Reporter: mayhemer, Unassigned)

References

(Blocks 2 open bugs)

Details

Part of preload plan as a requirement.

Proposal for the expected behavior:

  1. For <link preload> and <img lazy> in this order in the markup the preload will win, lazy loading will be nullified.
  2. For <img lazy> and <link preload> ordering it's disputable. Without any patching and IMO more logical it is to do the preload and override "lazy". Also, sites can use it to push the image load when suddenly required by adding a <link preload> tag dynamically.

To sum: I personally see random combination of <img lazy> and <link preload> for the same image as a web site bug. Preload should always win, what can be a useful feature.

Notes: lazy loading prevents speculative loading in the parser and actual loading until on the screen in the image element.

Blocks: 1621412
You need to log in before you can comment on or make changes to this bug.