amp-html – 是否可以在AMP中使用备用CDN,因为ampproject.org在中国被屏蔽?

有没有办法使用备用CDN来包含AMP需要的主要 JavaScript文件?可以使用与https://cdn.ampproject.org/v0.js不同的URL吗?是否有计划通过允许其他在中国没有封锁的CDN等来打开这一点?

使用网络搜索返回的几个顶级代理,似乎在中国阻止了ampproject.org.这并不令人惊讶,因为其他Google资源被屏蔽了.

编辑:我应该提到我尝试复制文件并在本地运行它,但AMP验证器在我尝试时抛出错误.

解决方法

不幸的是,我认为AMP所需的主要Javascript的源文件只能通过https://cdn.ampproject.org URL访问.

根据博客Getting started with AMP Html,accelerated mobile pages

AMP does this by creating new rules for bottlenecks: JavaScript and html elements that are considered slow are prohibited. JavaScript is only allowed using libraries provided by the CDN of Google itself.

也在他们的官方网页上:

Our goal with AMP HTML is reliable performance,so we designed it to be easily cacheable by content delivery networks (CDNs). Google is offering a service that delivers AMP HTML documents given their URL through its CDN. Others can use this service or make their own or serve AMP HTML pages from a plain-old-web-server.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些