Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cramforce opened this issue Jun 23, 2016 · 4 comments

Comments

@cramforce
Copy link
Member

commented Jun 23, 2016

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

@cramforce

This comment has been minimized.

Copy link
Member Author

commented Jun 23, 2016

Implementation in

@cramforce

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2016

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

@theefer

This comment has been minimized.

Copy link

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?

@cramforce

This comment has been minimized.

Copy link
Member Author

commented Oct 15, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.