Skip to content

Natively lazyload certain web components like tabs etc. #6208

@summercms

Description

@summercms

Something we have done in our cms, was adding lazyloading to tabs, which increased performance for all themes and plugins.

It would be kind of nice if that was rolled out to tabs in a web standardized form.

An example from our cms:

Let's say a user is on a using a 2G/GPRS network connection and the data is coming very slowly to their device:

  • First - The tab list loads

image

  • Second - You see a blue loading spinner for the tab content

image

  • Third - The tab content gets loaded.

image

Please note, when a user is using a fast internet connection all these sequences would take milliseconds.

Developers would just need to add an attribute to turn on Native lazy loading for the desired web component, with various options such as: lazy and eager see here: https://html.spec.whatwg.org/#lazy-loading-attributes

Also related to this comment: #3752 (comment)

Follows on from the discussion started here: openui/open-ui#238

CMS code pr for the lazyloading: octobercms/october#4658

Discussion about removing the FOIT (Flash of Invisible Text) when a user loads a web page using a fragment url to one of the tabs directly: octobercms/october#5393

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions