News for hackers. Stuff that matters.
Re:New WebKit features in Safari 15.4 by donatj on Monday March 14, 2022 @06:18PM (#30679187)
> WebKit added support for lazy-loading images with the loading attribute on the <img> element, providing web developers with an easy way to instruct the browser to defer loading certain images until the user scrolls near them

Maybe there's hope that I can then just turn this off on a browser level? I've got gigabit internet at home, and your images popping in on scroll makes it feel like I'm on dial up.

Lazy loading images is at best user hostile bandwidth saving, and it's not even that much in this day and age.

Re:New WebKit features in Safari 15.4 by afavour on Monday March 14, 2022 @07:00PM (#30679647)
The idea is that the browser, which is aware of your bandwidth, will disable this for you. But for a user on a limited bandwidth connection it’ll implement it. In other words the lazy attribute is a suggestion, not an instruction.

The experience you describe is with JavaScript lazy loaders which don’t have this awareness.

Re:New WebKit features in Safari 15.4 by chasil on Monday March 14, 2022 @07:27PM (#30679889)
Android makes it easy to have many browsers with different configurations for specific uses.

I have Bromite configured with DoH that almost blinds my ISP as well as Tor Browser.

Privacy Browser disables JavaScript by default, with an easy toggle to enable it, which is invaluable for taming many sites with obtrusive scripting.

I use Firefox Focus with the bundled libgecko for general browsing.

If I tried this on a Microsoft platform, I would constantly be advised not to do this.

I wish there was a good WebKit browser for Android, just for diversity.

Re:New WebKit features in Safari 15.4 by jeroenhd on Tuesday March 15, 2022 @04:21AM (#30682839)
I agree, I'm quite surprised there's no Webkit browser on Android just yet. Though, based on my experience with Webkit on Linux, the Android version of Webkit would probably be leagues behind Safari.

A real mobile Webkit would make testing for iOS a hell of a lot easier. I'm not planning for buying a mac just to run a browser, we're not living in 2010 anymore. Even Microsoft bothers to provide free VMs for developers to run their browser tests in.

Re:New WebKit features in Safari 15.4 by ezfe on Monday March 14, 2022 @06:27PM (#30679296)
If it's implemented properly, and your internet is actually that fast, you won't actually see them loading.
Re:New WebKit features in Safari 15.4 by 1123581321 on Monday March 14, 2022 @06:27PM (#30679290)
Chrome has the same feature and lets you disable it. That's probably the best compromise. You have amazing Internet. For the typical user, heavy image loading slows them down, and they're also less comfortable diving into browser settings.
Re:New WebKit features in Safari 15.4 by alwillis on Monday March 14, 2022 @06:55PM (#30679596)
Lazy loading images is at best user hostile bandwidth saving

The primary use case is to not load images you may not ever see because you may not scroll that far down the page and they don't appear in the viewport.

Like any feature, it has to be used correctly by the developer… obviously hero images and other images important to the initial user experience shouldn't be lazy loaded.

Re:New WebKit features in Safari 15.4 by account42 on Wednesday March 16, 2022 @05:12AM (#30696742)
> The primary use case is to not load images you may not ever see because you may not scroll that far down the page and they don't appear in the viewport.

That is the "bandwith saving" part. It's user hostile because it is another non-JS privacy leak and because it means that you can no longer open a website to read later when you might not have internet access.

> obviously hero images and other images important to the initial user experience

Hero images are typically the most pointless and irrelevant to the user experience. If you want to save bandwidth then push back against this fad.

Re:New WebKit features in Safari 15.4 by johncolanduoni on Monday March 14, 2022 @06:28PM (#30679302)
If you don’t have gigabit internet (i.e. most people), then it’s not so user hostile.
Re:New WebKit features in Safari 15.4 by donatj on Monday March 14, 2022 @06:35PM (#30679397)
In my experience it's more user hostile the worse your connection, because they have to sit and watch the images load for an even longer amount of time than I do, whereas it could have kept loading for them ahead of time.

Where without lazy loading they could normally get up and get a cup of coffee and come back, you are now actively wasting their time as they scroll.

Re:New WebKit features in Safari 15.4 by askonomm on Monday March 14, 2022 @07:05PM (#30679683)
If the person is viewing a gallery website, perhaps, but most websites are centered around textual content, which would be available much faster with lazy loading of images, thus the user on poor connection would actually get the _useful_ part of a website much faster.
Re:New WebKit features in Safari 15.4 by eternityforest on Monday March 14, 2022 @11:53PM (#30681494)
When you only have 2GB a month of mobile data, anything that saves a megabyte is worth it, even stuff like Google's data saver they used to have.
Re:New WebKit features in Safari 15.4 by redwall_hp on Monday March 14, 2022 @06:47PM (#30679520)
Honestly, it's more so. Greedy loading means that on a slower connection images will load before you scroll to them. If you're lazy loading, the request doesn't kick in until later, so you'll be waiting for images to load.

It's good for mobile devices, since you can save on usage caps (which should be illegal, but that's a digression).

Re:New WebKit features in Safari 15.4 by JimDabell on Monday March 14, 2022 @10:00PM (#30680949)
It’s even more user hostile when your connection is not great.

It’s horrible UX when you open a bunch of tabs in the background and then when you try to read them, they haven’t loaded properly. Especially if you are on a train or something where your Internet connection is spotty and they could have loaded at the point you opened the tab, but now they cannot.

The main improvement here is that if it is built into the browser instead of implemented individually on each site with JavaScript, there’s a better chance you’ll be able to disable it globally.

Re:New WebKit features in Safari 15.4 by alwillis on Monday March 14, 2022 @09:22PM (#30680728)
People forget that latency impacts web performance and not just bandwidth.

Also lazy loading enables the bandwidth that is available to be used on critical path items and not on images further down the page, especially if they’re non-origin images that require the overhead of another TLS handshake + connection, etc.

You don’t get the benefit of HTTP/2 prioritization with non-origin connections.

Re:New WebKit features in Safari 15.4 by koolaidman on Monday March 14, 2022 @06:32PM (#30679363)
Whenever I open an article I just hold the spacebar until the full article and all images have loaded, then scroll back up
Re:New WebKit features in Safari 15.4 by frontier on Monday March 14, 2022 @07:02PM (#30679665)
Unfortunately if you want to rank these days you have to implement these kind of things, or Google marks you site down as having poor performance. At least with a standard <img> attribute there is now a chance for a simple browser setting to turn the behaviour on/off/auto depending on connection type/etc.. unlike all of the various javascript solutions.
Re:New WebKit features in Safari 15.4 by dmw_ng on Monday March 14, 2022 @06:24PM (#30679261)
> Lazy loading images is at best user hostile bandwidth saving

It can easily be the vast majority of bandwidth spend even on a lightweight site. Add video widgets and bring that closer to 99%. Lazy loading is frequently a "can afford an extra 5 full time engineers" optimization

Re:New WebKit features in Safari 15.4 by donatj on Monday March 14, 2022 @06:31PM (#30679340)
> Lazy loading is frequently a "can afford an extra 5 full time engineers" optimization

I find this figure suspect. I work on a site with millions of users whose core service is essentially displaying a stream of images to end users, and our spend on CDN bandwidth is barely into five figures

Re:New WebKit features in Safari 15.4 by dmw_ng on Monday March 14, 2022 @07:31PM (#30679932)
I picked 5 at random, but I guess it really depends on where you are. Assuming 5 was the real number, that's only $28k/month bandwidth spend given the average SWE salary in the UK (£38,561 going by google), including 33% for tax and non-salary costs. That's about 327 TB worth of undiscounted AWS bandwidth, or roughly a site averaging 993 Mbit/s.

A small video site might start at 3 Gbit/s, a medium sized one closer to 30. These estimates really are quite conservative depending on the context

Re:New WebKit features in Safari 15.4 by HWR_14 on Monday March 14, 2022 @06:32PM (#30679365)
I suspect he was talking about the cost, not the benefit
Re:New WebKit features in Safari 15.4 by youngtaff on Tuesday March 15, 2022 @08:17AM (#30684365)
> Lazy loading images is at best user hostile bandwidth saving, and it's not even that much in this day and age.

Poorly implemented lazy loading of images is probably the culprit here

Re:New WebKit features in Safari 15.4 by kingcharles on Monday March 14, 2022 @07:36PM (#30679957)
I don't use it just for my users, I use it for my sites which are extremely image heavy and I don't want to load dozens of images that the user might never scroll to.
Re:New WebKit features in Safari 15.4 by tomxor on Monday March 14, 2022 @08:24PM (#30680264)
> I've got gigabit internet at home [...] Lazy loading images is at best user hostile bandwidth saving

You might want to consider how lucky you are for a second.