为什么amp-video和amp-audio强制在src中使用https? [英] Why amp-video and amp-audio force the usage of https for src?

查看:278
本文介绍了为什么amp-video和amp-audio强制在src中使用https?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 AMP视频的文档中,这表明:

On the documentation about AMP-video this is indicated that:

src :如果没有孩子,则为必需. 必须为HTTPS.

src: Required if no children are present. Must be HTTPS.

为什么需要这样做?

  • 这是出于安全性问题吗? (我的视频和音频不需要安全性.)
  • 这是为了提高性能(在这种情况下,因为https比http快?)
  • 还有其他原因吗?

从我的角度来看,让完整的AMP技术可以在http上使用并且仅将其中的一部分限制为https看起来很奇怪.这背后的原因是什么?

From my point of view, that look strange to allow the full AMP technology to work on http and only restrict part of them to https. What is the rational behind that ?

推荐答案

这很安全-如果/当您的内容托管在Google的CDN上时,所有元素都将通过HTTPS提供,因此标准HTTP元素将无法使用.

It's a security thing - if/when your content is hosted on Google's CDN, all elements will be served over HTTPS, so standard HTTP elements won't work.

这篇关于为什么amp-video和amp-audio强制在src中使用https?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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