From 440fde89f6d0643ecddd67c97e55b08b968b3fd5 Mon Sep 17 00:00:00 2001
From: Simon Pieters The options is an See issue #5408.IntersectionObserverInit
dictionary with the
- following dictionary members: «[ "rootMargin
" → an
- implementation-defined value ]»rootMargin
" → lazy load root
+ margin ]»
This allows for fetching the image during scrolling, when it does not yet — but is about to — intersect the viewport.
+ +The lazy load root margin suggestions imply dynamic changes to the
+ value, but the IntersectionObserver
API does not support changing the root
+ margin. See issue w3c/IntersectionObserver#428.
+ + The lazy load root margin is an implementation-defined value, but with + the following suggestions to consider:
+ +Set a minimum value that most often results in the resources being loaded before they + intersect the viewport under normal usage patterns for the given device.
The typical scrolling speed: increase the value for devices with faster typical scrolling + speeds.
The current scrolling speed or momentum: the UA can attempt to predict where the scrolling + will likely stop, and adjust the value accordingly.
The network quality: increase the value for slow or high-latency connections.
User preferences can influence the value.
It is important for + privacy that the lazy load root margin not leak additional information. For + example, the typical scrolling speed on the current device could be imprecise so as to not + introduce a new fingerprinting vector.