Tagged: web-performance

  • Note - Posted on

    Today I learned, via Calibre’s article on Lazy Loading Images, there is a difference in how far ahead each browser fetches lazy images.

    BrowserImagesIframesVideo and audio
    Chrome, 4G1,250px2,500px1,250px
    Chrome, 3G2,500px3,500px2,500px
    Chrome, 2G6,000px6,000px6,000px
    Firefox600px600pxNot supported
    SafariOne viewport0pxNot supported

    Additionally, there is a difference in how horizontal lazy loading works in Chrome, Safari and Firefox. Via web.dev’s article on Browser-level image lazy loading for the web:

    Chrome 121 changed the behavior for horizontal-scrolling images like carousels. These now use the same thresholds as vertical scrolling. This means for the carousel use case, images will be loaded before they visible in the viewport. This means the image loading is less likely to be noticeable to the user, but at the cost of more downloads. Use the Horizontal Lazy Loading demo to compare behaviour in Chrome versus Safari and Firefox.

  • Note - Posted on

    Today I learned, lazy loading only works when JavaScript is enabled.

    As per the HTML spec,

    This is an anti-tracking measure, because if a user agent supported lazy loading when scripting is disabled, it would still be possible for a site to track a user’s approximate scroll position throughout a session, by strategically placing images in a page’s markup such that a server can track how many images are requested and when.