Editors should be able to mark up certain pieces of content as non-essential for the initial page load - for example navboxes. On HTML heavy elements this can improve first paint and fully loaded time.
These content elements should not be served in the initial page load but instead will be lazily loaded when either
- the content is scrolled into view
- the user requests to load the content via a button click
Editors are already doing this in a way. Content in navboxes is collapsed by default and has to be clicked to be opened.
We should introduce a mechanism for deferred loading that retrieves this content via the API where needed.
<div> <div>Offices and distinctions</div> <div class="secondary-content"> ... </div> </div>
- Should be a class or tag that can be edited to templates that identifies a portion of markup that does not need to be loaded on payload
- Outputted HTML should carry retrieval information of document fragment
- Should be an API that allows retrieval of the content of these fragments.