AMP in PWA
In this approach, AMP content is embedded and used as a data source in the PWA. This setup relies on the use of a special AMP runtime called Shadow AMP, which is designed to run AMP within a non-AMP page. When the Shadow AMP script is included in your main page, it doesn't convert your page into AMP. Rather, it's used to load and run AMP content within that page.
A common PWA architecture is to have an app shell that performs XHR content fetching--often via a JSON content API--and which then processes and displays the fetched content. The use case for AMP in PWA via Shadow AMP is that you can just reuse your AMP pages with very little work, rather than having to build a JSON content API separately.
While this method is described ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access