Archive: November 2026

  • 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.

  • Don't Inherit the Box Model | OddBird

    While inheritance is a core concept in CSS, only a small minority of properties ever do it. Inheritance is part of the ‘defaulting’ process, which determines what to do when no value has been explicitly provided for a given property on a given element. Some properties, like color and font revert to the value used on the parent element. They inherit the value. But most of the properties we use – background, border, margin, padding, display, and so on – revert instead to their initial value defined in the specification.

    There are more properties in each category, but I think at this point the distinction should be clear. Some properties apply to the contents, and those are the properties that inherit. Other properties apply to the box, and do not inherit.

  • Note - Posted on

    Today I learned, elements with a positive tabindex value are focused first, from the lowest value up, before tabindex=“0” in sequential keyboard navigation.

    I was completely unaware of this behaviour. I guess because I had only ever used tabindex=“0” (for scrollable overflow containers) and tabindex=“-1” (to remove an element from sequential keyboard navigation) until now.

    Also, via MDN’s reference page on tabindex HTML global attribute:

    Some focusable HTML elements have a default tabindex value of 0 set under the hood by the user agent. These elements are an <a> or <area> with href attribute, <button>, <frame> , <iframe>, <input>, <object>, <select>, <textarea>, and SVG <a> element, or a <summary> element that provides summary for a <details> element.