Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Chrome Chromium Firefox Google The Internet

Firefox, Wordpress Move to Support Lazy Loading of Images and iFrames (neowin.net) 59

"Lazy Loading" would augment HTML's <img> tag (and <iframe> tag) with two new attributes -- "eager" (to load immediately) and "lazy" (to load only when it becomes relevant in the viewport).

Felix Arntz, a developer programs engineer at Google (and a WordPress core committer) notes the updates in the HTML specification for the lazy loading attributes, adding that it's "already supported by several browsers, including Chrome and Edge" and also the Android browser and Opera.

And lazy loading can now also be toggled on for Firefox 75 Nightly users, reports Neowin, though it's disabled by default: It's not clear if it will be enabled by the time Firefox 75 reaches the stable branch but according to comments on the Bugzilla thread, it's in high demand. Previously, websites could employ lazy loading by using JavaScript but now lazy loading syntax is supported directly in the web browser.

The implementation in Firefox comes after Google added the feature to its browser.

Google's Arntz has also written a post describing a proposal to begin lazy-loading images by default in Wordpress. The proposed solution is available as a feature plugin WP Lazy Loading in the plugin repository. The plugin is being developed on GitHub. Your testing and feedback will be much appreciated.
This discussion has been archived. No new comments can be posted.

Firefox, Wordpress Move to Support Lazy Loading of Images and iFrames

Comments Filter:
  • How about fuck no (Score:2, Insightful)

    by Khyber ( 864651 )

    This lazy tag is what allows for infinite-scrolling garbage.

    We have enough RAM and bandwidth. Just load the whole fucking goddamned webpage outright and get rid of that infinite-scrolling shit like a competent engineer.

    • I hate how nothing is fully rendered anymore. Even simple lines of text are collapsed and make you click to see the rest even if its a single word! Sites use javascript to keep images blurry until they come into view and then clear up. Of course that megabyte of javascript code makes scrolling jerky and slow.

    • Re:How about fuck no (Score:5, Interesting)

      by Anonymous Coward on Sunday February 16, 2020 @11:47AM (#59732964)
      This.

      As a desktop/laptop user, my usage pattern for news/link aggregators is often to open a couple dozen tabs and read the content in the approximate order in which the tabs were opened.

      When traveling, I might not even have internet connectivity at all, let alone unmetered home service.

      When lazy-load was first invented. I had to change my usage pattern to open each tab and scrub the scrollbar up and down from top to bottom in order to trigger the javashit that loads the actual images. Then go back to the aggregator to find more content. All so some marketing fuckwad could point to metrics that determine which version of the article got more views "below the fold" (as if "the fold" has any relevance in a world without newspapers)

      While I welcome the reduction of dependence on javashit, I realize that I'm now going to have to go through this asinine rigamarole for plain text as well as images.

      I, too, miss the days when a browser would just load the fucking webpage and its associated content.

    • I thought the real driver for lazy loading was for phones (where bandwidth isn't unlimited) and areas/regions/countries that don't have 10s of Megabits per second bandwidth.

    • I'm fine with it as long they provide toggle to disable the behavior. It would be even better than current javascript implementation as this way I can disable it everywhere.

      The toggle exists in chrome though it's in flags page instead of settings.
    • I hate the infinite-scrolling pages. Especially those that automatically load the next section. I've come across one or two sites that have the contact information in the footer of the page but you can't ever get to the footer because it's always fetching the next section (and it never seems to run out of sections).

    • by xonen ( 774419 )

      We have enough RAM and bandwidth.

      No we don't. And this kind of thinking has lead to the software bloat we have today.

      There's days i miss the sites from the 90's that tried to cram as much information with as little bytes as possible cause all we had was a 56k modem. Some pages back then loaded faster than the average website these days over fiber.

      The 16GB in my system is not a card blanche for the webbrowser to use most for it. And the very second it starts lagging another application, like my game, i cus the website builders for being a b

    • We have enough RAM and bandwidth.

      Maybe YOU have enough bandwidth to waste it - and your time and data budget - on acres of images that you'll never even put on the screen. But that's not necessarily true in the rest of the world - including rural and inner city areas of the US, even parts of Silicon Valley.

      There are still people in the world who are out of the range - or budget - of cellular service with high-speed internet, or pay by the byte or tier for their data. These people may also be on "slow high

      • by Khyber ( 864651 )

        "Maybe YOU have enough bandwidth to waste it - and your time and data budget - on acres of images that you'll never even put on the screen."

        Oh ye that knows exactly jack shit about compression and efficient page coding.

        Meanwhile all of my pages are at maximum 4kB in size, with full fucking scripting and more, EXCLUDING music and images, which are still optimized to hell and back for size (and also thef act that most people are looking at them on less than a 7 inch screen, which means I can keep the actual r

        • LEARN CODE YOU FUCKING NOOB.

          ROTFL! NOOB! Rhymes with tube - which is what the first machine I was paid to code for used - not just for the switches, but for the freekin' DIODES in the logic. You've made my day. B-)

          Oh ye that knows exactly jack shit about compression and efficient page coding.

          He says to the guy for whom SIGGRAPH in the '70s and '80s was his personal "Thousand dollar night at the movies", examining all the latest hax trying to get decent images out of inadequate crunch and eliminate the r

          • (Come 1984 Pixar "Showed Them ALL" [...] . (Boring...)

            Well, Pixar's hack was brilliant, not boring at all. But "throw a render farm at it" replaced the endless flow of interesting hacks. So SIGGRAPH became much less entertainment. (Then I got involved in this startup ... .)

            While I'm at it:

            Even then you hit limits if you want, say, [...] your picture to still look more like a cat than a Minecraft being or a derzzed cubist nightmare.

      • by AHuxley ( 892839 )
        Re "But that's not necessarily true in the rest of the world"... why change the internet back to slow for the rest of the world?
        If we waited for the rest of the world to get ready with new networking over past decades we would still be waiting.

        Enjoy the best tech now and the rest of the world can buy into the tech when they are finally ready/able/want to pay for it.
        Re "for instance, need graphics for?" Thats for the user and site to work out. Not for the needs of the rest of the world to slow down.
    • by AHuxley ( 892839 )
      The ads want to load first and fast.
      The content that fills the space between the ads can wait.
  • by jfdavis668 ( 1414919 ) on Sunday February 16, 2020 @11:49AM (#59732970)
    The content can show up in its own good time.
  • by Snotnose ( 212196 ) on Sunday February 16, 2020 @11:51AM (#59732972)
    All ads will be eager, everything else lazy.
    • The "Premium" version of Firefox will not lazy load while the "Community" version will lazy load.

      • by tlhIngan ( 30335 )

        The "Premium" version of Firefox will not lazy load while the "Community" version will lazy load.

        It's open source. To fix it all you have to do is ignore "lazy".

        All this stuff is just a parameter - browsers ignore parameters they don't know, so it's easy to have Firefox simply forget how to handle lazy loading. After all, there are billions of web pages out there that don't tell you how to load the images, and if an "eager" image takes longer to load, you don't want to hold up the rendering.

        It's really a re

    • by fph il quozientatore ( 971015 ) on Sunday February 16, 2020 @01:07PM (#59733134)
      Oh, I'd love that! It would make filtering them with ublock even easier and more reliable.
    • by rastos1 ( 601318 )
      In that case, I suggest a switch that swaps the meaning of the options.
  • Lazy loading prevents people from just copy-pasting the entire page and reading it offline, giving more control over content.

    • Lazy loading prevents people from just copy-pasting the entire page and reading it offline, giving more control over content.

      I'm sure someone will develop a nice add-on that will copy the whole page when it is all available. I used to have one that made nice epub copies for useful reading off-line. Very handy for some sites.

    • by GuB-42 ( 2483988 )

      If you save a webpage, all images will be loaded, even those that would be lazy-loaded during normal browsing.
      I just tried it out on https://mathiasbynens.be/demo/... [mathiasbynens.be] using Chrome 80.

      What you describe are JS tricks, not the native implementation supported by Chrome and now Firefox.

      • I get a wee red banner line that says:

        'loading' in HTMLImageElement.prototype === false

        and everything else is blank.

        • by GuB-42 ( 2483988 )

          It won't show anything but a red banner if lazy loading isn't supported. That's the test.
          If you are using Firefox, it is only available in the latest nightly and you need to enable it explicitly.

  • I've said it once and I will say it again: browser developers are lazy.

  • I noticed that whenever you move to a different page, or close a tab, or evrn close the browser on Android, the damn thing keeps downloading the images and whatnot.

    Which is extremely annoying if you're out of data and on a throttled connection, and it's flooded by Firefox loading crap it should already know I don't want!

    What moron designed that in the first place?

  • I hope this kind of stuff gives Firefox the boost. Lately Iâ(TM)ve been noticing some websites no longer testing with Firefox. It needs to have more market share to stop the ridiculous Chrome hegemony.

  • Browsers would display the page then slowly reveal images as the data came in. You could turn off images if you wanted.
  • by CanadianMacFan ( 1900244 ) on Sunday February 16, 2020 @12:29PM (#59733052)

    Developers are not the ones that should be deciding what content should be loading as "lazy" or "eager". It's my computer and my connection and the choice should be mine. I know how I'm using the data. The developer doesn't know if I'm limited in the amount of data I can download or if I prefer to see the text over images first or vice versa.

    Developers need to sop trying to impose their views on their users, and I say this as a developer.

    • by bsolar ( 1176767 )
      Of course they should: they design the site and this information is very dependent on how the site is designed to work properly. This doesn't mean users shouldn't be able to override the site's intended behaviour, but I guess there will be options or at least extensions to do that.
      • by ludux ( 6308946 )
        Bullshit. Developers design sites to bury content under advertising. Look at any modern website without an adblocker. The content is almost impossible to reach without some autoplaying video screaming at you or automatically scrolling adds blinking over the text you're trying to read. Content is irrelevant, content doesn't make money. Ads make money. A properly working site hooks you just enough to see as many ads as possible, and then you as the user have zero value after that.
        • by bsolar ( 1176767 )
          No, developers of sites who want to maximize revenue above proper design bury content under advertising, but that's not all sites. My suggestion is to stop visiting such sites or just visit them under your terms with content blocking: for many I'm sure you will not lose that much or you can find more respectful alternatives.
    • This is true - it should be in the hands of the devices first for users like you and me.

      But most users don't care about this until it hurts them - and having native support for this makes it a good tool for web developers to natively do the work for them.

      It's lazy loading for lazy users.

      I'm sure that someone out there will write a browser add-on to override this behavior for us in this increasingly smaller minority.

    • > Developers need to sop trying to impose their views on their users, and I say this as a developer.

        Be the first to get an extension in the store that changes all the image tags tto lazy.

    • Developers aren't deciding this. Developers are writing a tag, and your browser can choose to render that tag however you choose.

  • Finally (Score:4, Insightful)

    by Dagger2 ( 1177377 ) on Sunday February 16, 2020 @01:47PM (#59733212)

    I've been hoping this would happen for a while now. If browsers have a nice, standardized, easy way of triggering lazy image loading, it'll be much easier to disable it on all websites compared to the current situation where you basically have to write a custom script for each individual site.

    The reduction in site-specific Javascript monitoring for scroll events is just a bonus.

  • I block all iframes as the security nightmare that they are, so I could care less if they make the iframes (that I already block) purple polywogs or anything else. They will still all be blocked. Don't like it? Don't try to send them to me. End of line.

  • Sounds more like a way to let web sitew know if you've scrolled far enough to see an ad or article for ad categorization of you.

  • Around 1997, the webmaster of one of my favorite bands decided to have the website load as a 600x600 square (desktops then were 800x600 or 1024x768) and a small 100x400 upright rectangle. The square was the "TV screen" and the rectangle was the "remote" with buttons that changed content on the "TV" when clicked. The browser toolbars and everything were hidden.

    A neat design to play with as a demo site for 2 minutes, but a complete disaster for a full-time band website.

    It eventually went away in favor
  • Lazy Loading is fine As Long As there's a command to OVERRIDE it completely on a desktop.

    Load. The. Page. I'll wait. Or maybe I'll wait on another tab, but load it all so that scrolling is next-to-instant when I'm there.

    On a phone I'll maybe give you delayed fetch until visible -- just have an option defaulted to on that I can change. But KEEP the PREVIOUSLY LOADED data around, don't drop it just because it's gone from the viewport, drop it only when the page is gone.

Remember, UNIX spelled backwards is XINU. -- Mt.

Working...