3 ms·
You're thinking of your own costs; the developer is more likely thinking of their own than yours.
by hunter2_ 3y ago
You're thinking of your own costs; the developer is more likely thinking of their own than yours.
- duxup 3y agoAs a web dev… I honestly have never thought of it that way in terms of cost. I would rather a user see the whole page, consume all the content, it’s not a big cost.
- lxgr 3y agoThen you’ve probably just not worked on pages of that scale so far. Some very large sites maintain alternate versions of images in chance the browser supports something more efficient than JPEG; that can save about 30% – at the expense of a lot of complexity and extra server side storage. Yet they still do it: It’s still worth it for them. But nothing beats not loading the image at all! As a web user, I personally also don’t particularly like it.
- deprecative 3y agoIf only we could progressively enhance a page rather than stunt them via lazy loading.
- Izkata 3y agoImage-wise, isn't GIF capable of that? I remember back in the dialup days some image type would be quickly visible but very pixelated, then slowly get more detail as more of the image downloaded.
- xnx 3y agoThe JPEG standard includes an option for displaying images progressively so that you see large blocks of color that continue to refine into more pixels as the image downloads. In the mid 90's on a 14.4K modem you had plenty of time to watch this happen. I miss the effect, but fortunately most connections are now fast enough where the intermediate step wouldn't be noticeable for a single image.
- lxgr 3y agoThat doesn’t help today though (at least not without additional mechanisms): Each individual internet connection is often fast enough, and actually used bandwidth is more of a concern than saturating an individual connection.
- lxgr 3y agoThat would require a new browser feature or image metadata tag that indicates “load only until here if not visible”, right? Or do you mean web developers should manually swap assets based on visibility, rather than make a binary load/don’t load decision?
- ed_mercer 3y agoMost content-heavy media sites make use of CDNs, and the expenses involved are generally reasonable. It's unlikely that a slightly heavier image would have a significant impact on their costs. I think this might be more of a well-intentioned effort to help end-users save on bandwidth, but it could lead to a bad experience as OP pointed out in their blog post.
- iopq 3y agoCDN storage costs are actually very high, only large websites that basically run their own CDNs storage many different versions of the image to optimize for bandwidth. The company I worked for did, but they didn't pay for a CDN, just loaded everything from one server
- lxgr 3y agoUnlike self-hosting, CDNs (and many cloud computing services) are typically paid by the byte of outbound traffic, so sending 30% less per image often results in a direct 30% savings!
- dgb23 3y agoWe do this too and believe me, it’s not to reduce the server workload. It’s just progressive enhancement: The browsers that support a format get the lighter version, the ones that don’t, get a heavier fallback.
- viraptor 3y agoAs a developer adding lazy loading... nah. The motivation is more about prioritising resources. I want some images to load after everything else to free up the bandwidth for now critical resources. If I had the option of "when the connection is idle for 2s", instead of the current implementation of "lazy", I'd use that. I'm sure there are some other services which are more image heavy and will save some money this way, but it's not the only reason.
- hunter2_ 3y agoOk, so "monetary cost" and/or "performance cost" -- either way, it's for the benefit of the site (whether fiscal or reputational benefit). Although a desire for the latter is fairly well shared by all parties.