5

There are 3 ways to combine AMP with PWA (as described here):

  1. AMP pages with PWA features
  2. AMP as entry point into your PWA
  3. AMP as data source for your PWA

In both first and third approach, we are fetching AMP content from the server using service worker, modify it if required and render. Can someone please explain the difference between these approaches? What exactly is the use of 'Shadow AMP' API?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ctor
  • 805
  • 1
  • 10
  • 26
  • First approach is just a web site with PWA features using service worker for offline caching and manifest.json for add to homescreen and nice splash screen. Third approach is loading AMP page into shadow DOM using AMP.attachShadowDoc(). The AMP Shadow Doc API is explained here: https://github.com/ampproject/amphtml/blob/master/spec/amp-shadow-doc.md – Serge van den Oever Feb 17 '18 at 15:44

1 Answers1

1

“Shadow AMP” is a special version of AMP in your Progressive Web App. in the top level page in the AMP library, it will only “amplify” the page's the portions what you require, not control the top level content. The library will be used when the availability of the global AMP variable and Shadow AMP uses a “asynchronous function loading approach” to help with that.

To learn more, visit this website Tapita.io