Live-updating AMPs

[9/1/2016 Update: <amp-live-list> has been promoted from “experimental” to “stable”, and can now be used in production pages. Check it out, try it out and give us feedback!]

More and more publishers are leveraging the power of live blogs to connect readers to breaking news as it unfolds. Today we are inviting you to try out the beta for <amp-live-list>, a new AMP component that updates page content dynamically without additional navigation or reload: readers looking at an earlier version of the page will simply see new updates as they come in.


You—as a developer—have control of the content, and can override the component’s default styles. For example, a default class is applied to the most recent updates, so you can determine the style of new items, such as subtly highlighting the background for new items for a few seconds. The component also includes a customizable button for your users to pull in updates on demand.

How does it work?

In the background, while an AMP page using <amp-live-list> is displayed on the client, <amp-live-list> polls the origin document on the host for updates. When the client receives a response, it then filters and dynamically inserts those updates back into the page on the client. Publishers can customize the polling rate in order to control the number of incoming requests, and AMP caches like the Google AMP Cache can perform optimizations to reduce the server response payload, saving client bandwidth and CPU cycles.


To use <amp-live-list>, all you have to do is:

  1. While the component is in beta, opt into the experiment by entering

    into your javascript console on your testing page. You can also opt in on the AMP experiments page for all pages served from

  2. In the HTML for an AMP page, wrap any live-updating content in <amp-live-list> and its children, ensure that each element has the required attributes and structure, and publish the page.
  3. Whenever new information comes in, update the HTML for <amp-live-list> with new entries or changes to older entries, and re-publish the page.

That’s it! The child elements of <amp-live-list> will be dynamically updated as new content comes in.

Example implementation

&lt;amp-live-list id=&quot;live-list&quot; data-poll-interval=&quot;20000&quot; data-max-items-per-page=&quot;10&quot;&gt;
&lt;div update on=&quot;tap:live-list.update&quot;&gt;
You have updates
&lt;div items&gt;
&lt;div id=&quot;live-list-item-2&quot; data-sort-time=&quot;1464281932879&quot;&gt;world&lt;/div&gt;
&lt;div id=&quot;live-list-item-1&quot; data-sort-time=&quot;1464281932878&quot;&gt;hello&lt;/div&gt;

Why beta?

This is a very flexible format: on one hand, you could use it for live blogs, which feature updates across nearly the entire page, and can include details like pagination or deep-linking to specific posts. On the other, you might use it to update just one small section, like a scoreboard during a soccer game, or a map of voting results on the night of an election. With your feedback from testing real-world applications of the component, we have the opportunity change some of the behaviors and validations before launch.

This of course means that you shouldn’t launch it on a public-facing page until <amp-live-list> progresses to “stable” status, and that you should expect to see some validation errors associated with the component while you’re testing.

Try it out!

So check out the documentation in GitHub and at AMP by example, test out the component in your development environment, and give us feedback for what does and doesn’t work for your use-cases. The sooner we know what is and isn’t working for <amp-live-list>, the sooner we can polish it up and release it to production for use in your AMP pages.

Posted by Eric Lindley, Product Manager

Live-updating AMPs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s