如何在 cloudflare 等生产网站中使用 Google AMP 项目的 CDN? [英] how can i use the CDN of Google's AMP Project in a production website like cloudflare?

查看:21
本文介绍了如何在 cloudflare 等生产网站中使用 Google AMP 项目的 CDN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个帖子中我发现如何测试 Google AMP 的 CDN.

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

但是我如何在生产网站中使用它?

But how can i use it in a production website?

我想可以像 Cloudflare 或其他类似服务一样设置它,不是吗?

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

谢谢.

推荐答案

您仍将通过自己的基础设施提供 AMP 内容,即使 Google 收集并通过他们的基础设施提供.

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.

如果您想自己提供服务或从 Cloudflare 等 CDN 提供服务,则不涉及 Google CDN - 将一个 CDN 链接到另一个 CDN 或依赖 Google 将您的内容放在他们的缓存,以便从另一个可用.

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.

AMP 规范中没有规定内容的提供方式和来源.AMP 运行时无法控制资产的来源.

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.

因此,对于给定的 AMP 文档,使用 BBC 而不是 Guardian:

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

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

内容来自 www.bbc.co.uk,它可以指向他们的基础设施或像 Cloudflare 这样的 CDN.无论哪种方式,AMP 内容都可用.

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?

这篇关于如何在 cloudflare 等生产网站中使用 Google AMP 项目的 CDN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆