Live content updates with <amp-live-list>
Another component for updating content dynamically is amp-live-list
. Despite its similar name, it functions quite differently to amp-list
. The main differences are as follows:
amp-live-list
polls the source URL for new content at defined intervals, whileamp-list
performs a single fetch from a specified server endpointamp-live-list
works with AMP-HTML pages, whileamp-list
deals with JSON data
Target use cases for amp-live-list
include live blogs, breaking-news feeds, or any kind of live data that updates at intervals, such as sports scoreboards.
Note
Note that amp-live-list
will request updates from the URL it was visited on. So if the page is served via the AMP Cache, then amp-live-list
will request updates from the AMP Cache URL. In practice, this can mean slower updates than if being updated from the original URL, depending on how frequently the AMP Cache refreshes from your original page, and that depends at least in part on the caching headers...