Page MenuHomePhabricator

A way to have sections only load their data once a button has been clicked or when the section is scrolled into view
Closed, InvalidPublic

Description

To reduce dataload on the client-side for longer articles or articles with many images it may be useful to enable a feature that could be activated by editors of an article and/or depending on e.g. the detected connection-speed of the client.

This could make pages load faster and reduce traffic costs on the client-side. It is unlikely to be important for a large share of readers of most articles as even the longest articles should load fairly fast and traffic costs of loading a Wikipedia are usually low irrespective of the article's length.

If the feature is enabled for a client and/or article the sections could load once the section is navigated to in the TOC, scrolled into view (with ajax) or when a [show] button is clicked next to the section header.

An alternative or additional feature could be disabling images or reducing their thumbnail filesize depending on the e.g. the detected connection-speed of the client.

There are already ways to collapse sections/section-contents but these load the data anyways.

This is one of a series of tasks that would allow (/ improve) converting the Events list of https://en.wikipedia.org/wiki/2020_in_science to a table as suggested on the page's talk page. Other tasks of the series are linked in: https://phabricator.wikimedia.org/T258421

However, MOS:COLLAPSE is relevant to this task.

Event Timeline

Hi @Prototyperspective, thanks for taking the time to report this! What are clear steps to reproduce the situation? Which code base is this about? Please see and follow https://www.mediawiki.org/wiki/How_to_report_a_bug - thanks!

An alternative or additional feature could be disabling images or reducing their thumbnail filesize depending on the e.g. the detected connection-speed of the client.

Lazy-loading already happens, and disabling images in the mobile version (MobileFrontend) on older browsers which don't support other means of lazy loading.
See e.g. https://phabricator.wikimedia.org/T225946 or https://phabricator.wikimedia.org/T246838 for related work.
I'm not aware of a sane way to first check someone's bandwidth and then load content, because time is wasted by checking the bandwidth.