Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The image tags on that page need `loading="lazy"`. This made me curious what contributing to the wikipedia application (not articles) is like. Anyone have any insight/info on this?


Personally, I much prefer having the images all download on page load. Lazy loaded images never seem to download before I scroll to them, so I have to keep waiting for them to come in as I go through the page.


You can configure your browser either to ignore loading="lazy" completely or to increase the distance below the viewport where images load. Search for "lazy" in about:config if you use Firefox for example.


Sadly I don't think there's any such option in Chromium or mobile Safari, the two browsers I use.


You actually can do that on Safari:

iOS Settings > Safari > Advanced > Lazy image loading

I’m fairly certain you can do it on Chromium as well, but I don’t remember how.


Yep, this is one of those issues that get missed because a good chunk of SWEs have fast machines and test the application locally. I've started enabling throttling in dev tools so I can catch these kind of UX problems.


It's also one of those things where no matter what you do, someone will hate it and other will love it.

Lazy load images? People with bandwidth quotas might praise you. Others with sporadic connections will despise it, because they can't load the page once and revisit the already fully loaded tab when internet disappears. People with high bandwidth and no quotas will barely notice anything, unless they are quick readers, then they'll blame you for not loading the images quickly enough.

Not lazy load images? Everything vice-versa.


This is a feature that should be determined by the user agent rather than the server. It's the user agent that is aware of bandwidth limitations and desires of the user, after all.


Believe it or not, but websites could already implement it based on what the user-agent knows about the connection already. `navigator.connection` (returns NetworkInformation - https://developer.mozilla.org/en-US/docs/Web/API/NetworkInfo...) supposedly holds what the user-agent thinks the connection-type is. Although not implemented in Safari nor Firefox.

Although I do think there are concerns around privacy when it comes to adding more bits people can use to track you, which is probably why it's not implemented in Safari or Firefox yet.

Automatically doing lazy-loading of <img/> tags based on information not shared with the websites probably would break random websites that depend on being able to load images outside of the view of the user, for one reason or another, so probably won't be possible to fix by now.


> Believe it or not, but websites could already implement it based on what the user-agent knows about the connection already. `navigator.connection` (returns NetworkInformation - https://developer.mozilla.org/en-US/docs/Web/API/NetworkInfo...) supposedly holds what the user-agent thinks the connection-type is. Although not implemented in Safari nor Firefox.

This is absolutely the wrong way around. I don't care much for lazy loading but if you must add it then use the loading="lazy" hint and let the browser decide based on that. Don't try to be smart, e.g. navigator.connection won't tell you that I'm about to get on a plane where I won't have internet at all.


I'm a mediawiki developer. Its open source. You can certainly contribute things. For something like that the difficult part is convincing everyone that loading=lazy is the right thing to do for body images. There are pros and cons, and a patch changing something without a clear right answer isn't going to get merged without buy-in (i should note im a backend dev, so this particular example is not something i know a lot about)

Anyways, lots of mediawiki devs hang out on #mediawiki on irc.libera.org irc channel. If you want to get involved come say hi.



Spoiler alert: you need to write PHP.


And?



No they don't. When my browser tells me it's finished loading the page I expect the page to be completely loaded.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: