Firefox

Firefox 75 gets lazy loading support for images and iframes

Mozilla plans to support lazy loading for images and iframes in Firefox 75. Lazy loading refers to a technique that defers the loading of elements on a page to improve loading and rendering of the webpage, reduce memory use and network data usage; these elements are usually below the fold on load (not visible to the user).

Lazy loading up until now required the use of JavaScript. A new attribute for images and iframes adds lazy loading support in browsers that support it. Google introduced support for the new lazy loading tag in Chrome 76 which it released last year.

Mozilla added support for lazy loading in recent versions of Firefox Nightly, the cutting edge development version of the browser. Lazy loading is not enabled by default but users may enable it in Firefox Nightly. The feature will make its way to Beta, Dev and eventually Stable versions of the Firefox web browser.

Control Lazy Loading in Firefox

Here is how you control lazy loading functionality in Firefox:

  1. Load about:config in the browser’s address bar.
  2. Confirm that you will be careful if the intermediary warning page is displayed.
  3. Search for dom.image-lazy-loading.enabled.
  4. Toggle the preference so that its value is True (enabled).

You can disable lazy loading at any time by setting the preference to False in about:config. Load the following demo page to check if lazy loading support is working correctly.

lazy loading test

Lazy loading, once enabled, works on sites that use the tag for images. WordPress plans to introduce support for the loading attribute for images in the popular blogging platform by default which would add support automatically to WordPress blogs once the change lands and the blog is updated to the new version.

Webmasters who don’t use WordPress may need to add the tags manually or by using scripts. All it takes is to add loading=”lazy” to images or iframes to make use of the new feature.

Closing Words

The native integration of lazy loading of images and iframes in web browsers, and support of the new attribute by WordPress, should push the feature significantly. JavaScript lazy loading has some issues associated with it but since the native integration limits support to image and iframes, it should not be affected by the majority of these.

Now you: what is your take on lazy loading? (via Techdows)

You Might Also Like