1st class support for PWAs that load AMP docs. #3742

cramforce opened this Issue Jun 23, 2016 · 4 comments


None yet

3 participants

cramforce commented Jun 23, 2016 edited

Make it easy to build progressive web apps (PWAs) that load AMP documents as their primary content source. AMP documents in this model, would be the perma links, but a ServiceWorker can intercept them and instead deliver an app shell, which then loads the AMP document inside of it. Subsequent navigations would happen inside the app shell

  • Support rendering AMP documents into Shadow DOM, where each Shadow DOM instance holds a doc.
  • Provide for a clear mechanism for the PWA to progressively enhance the AMP document.
  • Provide a ServiceWorker library for handling document caching and app shell delivery.
  • Provide a VanillaJS sample PWA.
  • Provide React, Angular, Ember and potentially other sample PWAs implementing this pattern.

The initial design doc is here: https://docs.google.com/document/d/1rvcFY3Zhg6oUmRtaceEdOYuwjciVaHnYIn_tMvGbRME/edit?usp=sharing


Implementation in

@dvoytenko dvoytenko self-assigned this Jun 23, 2016
@dvoytenko dvoytenko added this to the Current milestone Jun 23, 2016

@dvoytenko Quick ping on request for a better project description above :)

theefer commented Oct 15, 2016

Having toyed with it a little now, I find this design working really well, especially the use of ShadowDOM root that enables SW intercepting requests, which allows seamless offline caching of AMP content.

The one hurdle I've encountered is that the AMP Cache doesn't allow CORS requests to AMP docs, so I had to rely on a CORS-enabled proxy to fetch the content from the client. Is this a strict limitation of the AMP Cache and clients are supposed to rely on a proxy/their own cache, or might this be allowed in the future?


It is definitely an option for the future. I'm not 100% sure about the security implications.

@dvoytenko dvoytenko closed this in #5588 Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment