How to Enable Lazy Loading for Images and Iframes in Firefox
An interesting feature is coming to Firefox, which will significantly decrease the page loading time in the browser. A native ability to postpone image and iframe loading is already landed in the Nightly version of Firefox 75.
Then lazy loading is enabled, the browser will prioritize the content visible to the user, while postponing the rendering process for images and frames that are not visible to the user. As of this writing, the same functionality can be utilized by webmasters with the help of JavaScript.
Firefox Nightly now includes the native markup support for the same. The sample HTML code looks as follows:
<img loading="lazy" src="some image url" width="400" height="400" alt="Lazy loading sample">
The loading=lazy attribute was recently included to the HTML standard as a draft, so sooner or later it will be supported by all mainstream browsers.
As of now, to give it a try, you need to install Firefox Nightly and enable this feature as follows.
To Enable Lazy Loading for Images and Iframes in Firefox
- Open Firefox.
- In a new tab, type
about:config
in the address bar. - Click I accept the risk.
- In the search box, type or copy-paste the line
dom.image-lazy-loading.enabled
. - Double-click on the value name in the search result to toggle its value from
false
totrue
. - Restart Firefox.
You are done!
It is worth mentioning that Firefox is not the first web browser that implements lazy image loading. Firefox goes after Chrome, which has a similar option starting in Chrome Canary 70.
The stable channel of Firefox hosts Firefox 73. To learn more about changes introduces in Firefox 73, check out the following post:
Firefox 73 is available, here are the changes
Articles of interest:
- Enable Site Specific Browser in Firefox
- Automatically Export Bookmarks To HTML File in Firefox
- Enable DNS over HTTPS in Firefox
- Remove What’s New Gift Box Icon From Firefox
- Enable Green HTTPS Icon in Firefox 70
- Disable Content Blocking for Individual Sites in Firefox
- Enable Loading of userChrome.css and userContent.css in Firefox
- Prevent Firefox From Suspending Tabs
- How to Refresh Firefox in Windows 10
- Disable Extension Recommendations in Firefox
- Remove Individual Autocomplete Suggestions in Firefox
- More HERE.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
its also available in edge under falgs.
yep, since it is Chromium-based now.
iframes should have the lowest priority in my opinion