【问题标题】:youtube videos on web site is through iframe of embed tag网站上的 youtube 视频是通过嵌入标签的 iframe
【发布时间】:2012-10-08 09:07:19
【问题描述】:

在网站上发布 youtube 视频的最佳做法是使用 iframe 或嵌入标签

<iframe width="420" height="345"
src="http://www.youtube.com/embed/XGSy3_Czz8k">
</iframe> 

<embed
width="420" height="345"
src="http://www.youtube.com/v/XGSy3_Czz8k"
type="application/x-shockwave-flash">
</embed>

我的问题是在网站上发布视频的最佳做法是什么...... 以及使用它们对性能有什么影响....

【问题讨论】:

    标签: html youtube


    【解决方案1】:

    新样式是&lt;iframe&gt;。欲了解更多信息look here 与此通知:

    Please keep in mind, the mobile player cannot be embedded on external mobile sites.

    【讨论】:

    • 两者的性能差异是什么...因为我在一些网站上看到他们中的大多数人建议不要使用 iframe...
    【解决方案2】:

    我认为使用嵌入标签总是安全的。在网站中使用 iframe 是漏洞的来源。 iFrames 为黑客打开了窗口。对于嵌入标签,没有报告重大安全问题。

    嵌入标签更有效,因为我们可以更有效地处理不同的情况,比如不支持播放器等...

    【讨论】:

    • 不,IFRAME 本身不是安全问题,问题是是否有人(病毒/黑客)在您的页面中注入了该 IFRAME。
    • 您真的认为 Youtube 通过提供 iframe 代码在您的网站上实施来感染您的网站??
    猜你喜欢
    • 2021-03-25
    • 2012-07-03
    • 2011-12-04
    • 2016-03-20
    • 2012-02-22
    • 1970-01-01
    • 2013-11-21
    • 1970-01-01
    • 2017-06-27
    相关资源
    最近更新 更多