how can i use the CDN of Google's AMP Project in a production website like cloudflare?

不羁的心 提交于 2019-12-02 07:09:37

问题


In this thread i discovered how to test the CDN of Google AMP.

But how can i use it in a production website?

I imagine that is possibile to set it in some way like Cloudflare or other similar services, isn't it?

Thanks.


回答1:


You're still going to be serving the AMP content from your own infrastructure, even if Google then collect it and make it available via theirs.

If you want to serve it yourself or from a CDN like Cloudflare then the Google CDN isn't involved - it doesn't seem to make much sense to chain one CDN to another or to rely on Google having your content in their cache for it to be available from another.

There's nothing in the AMP spec that governs how and from where the content is served. The AMP runtime doesn't control where assets come from.

So, using the BBC rather than the Guardian, for a given AMP document:

http://www.bbc.co.uk/news/amp/election-us-2016-35320021

The content comes from www.bbc.co.uk, which could point to their infrastructure or to a CDN like Cloudflare. Either way the AMP content is available.

I think your question is slightly unclear. Is this what you were looking for?



来源:https://stackoverflow.com/questions/34802576/how-can-i-use-the-cdn-of-googles-amp-project-in-a-production-website-like-cloud

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!