'Is AJAX to load embeds possible in AMP?

Quick question: Is it possible to dynamically load content like

<amp-twitter
  data-tweetid="611193269532295168"
  layout="responsive">

via AJAX into an AMP article?



Solution 1:[1]

AFAIK, it is not possible but AMP - LIVE-UPDATING AMPS

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.

enter image description here

enter image description here

The amp-live-list component adds support for publishing live updates to AMP pages as new content becomes available in the source document. This works great for implementing live blogs.

In other words, the AMP runtime will poll the server for updates to the origin document, fetching itself. The server can returns the entire AMP page or parts of it, and the runtime updates the page in-place seamlessly.

You can also check a related SO question can AJAX polling be used with AMP? that discusses how to dynamically load updates for the AMP pages.

Hope this helps.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community