Search code examples
amp-html

When are items in an amp-list displayed


If I use an amp-list to display a fairly large list of data (for example as shown below) will the first items in the list be displayed before the last one is loaded, or will it download the whole JSON list before displaying any of it? If the latter, what is the best way to get the first items displayed more quickly?

Example:

<amp-list width="auto" height="300" layout="fixed-height" src="https://jsondata.myurl.com">
    <template type="amp-mustache">
        <div>{{field1}} and {{field2}}</div>
    </template>
</amp-list>

Solution

  • I afraid that amp-list starts to load only after the whole JSON response is received and then it starts to display items one by one depending on which got his data(image for example) first. And if your page is already cached by Google your first loading result would be the same all times. So, my conclusion is that you can't influence on loading precedence, at least so far. Hope I'm right and it will help you.