Load collections as the visitor scrolls
Defer selected collections until visitors approach them on a long page. Check the trade-offs for search, printing and content near the top.

A long page may include a team grid or secondary catalogue well below its opening content. Loading those entries only as the visitor approaches defers their rendering and data request. The benefit depends on the page and workload, so compare the same page with the setting on and off before making a speed claim.
Long pages often carry more than one collection: a table of products, a grid of team members, a timeline of past events. Every one of them used to be drawn before the page could open, even the ones far below the fold that some visitors may not reach. Domma CMS 1.99.0 lets you mark any of them to load when scrolled to.

A moment later, as the visitor reaches them, the entries are in place:

How to switch it on
In the page editor, open the collection's settings (right-click the tag and choose Edit Collection…, or insert a new one), open More options and tick Load when scrolled to. Then save the page.

If you write tags by hand, add the word lazy:
[collection slug="recipes" display="cards" lazy /]
[view slug="cheap-products" display="table" lazy /]
It works the same on a [collection] and on a [view], in every display: table, cards, list, block, accordion, timeline, carousel and list group.
Everything else stays the same
A lazy collection looks and behaves exactly as it did before, once it has loaded:
- Search, sorting, pages and the right-click filter menu all work, and a shared link with filters still opens filtered.
- Your own blocks and buttons inside the entries work as before.
- A collection inside a tab or an accordion waits until that tab is opened.
- Collections with Scope set to Current user, and views with their own access rules still show each visitor only what they are allowed to see. If the page is unpublished or restricted later, its lazy parts stop loading too.
When to leave it off
- Search engines and printouts see "Loading…" in place of the entries. Leave it off collections whose words you want found in Google, or printed.
- Collections at the top of the page gain nothing, because the visitor sees them straight away.
- Pages with an expiry (anything with an "expires at" date) draw their collections straight away, so nothing shows after its time.
- The quick preview in the editor always draws the entries, so you can check them as you write.
Getting it
Load when scrolled to is in Domma CMS 1.99.0 for every site, with no Tool to switch on. Find it in the user manual under Data shortcodes.
Check the difference on your page
Use the same page and entries with the option off and on. Compare the opening response and network requests under the same conditions, then scroll to the deferred display and test its filters. Inspect print output and the HTML served without JavaScript too. Keep important searchable content rendered initially. The screenshots demonstrate the loading sequence; they are not a performance benchmark.


