问题原文
原帖链接 · Dhon Joe · CC BY-SA 3.0
Is it better to embed a Youtube video in an Iframe or to load the video on an HTML5 tag ?
Which's better from an SEO point of view ?
Is there any difference on the loading time, optimization and the maintainance?
已采纳解答
原帖链接 · Itai · CC BY-SA 3.0
Both have advantages and disadvantages. As @Evgeniy said, from an SEO perspective, there is no difference. It is the SEO of your page that includes the video, regardless of its source that is important.
When you embed a YouTube video, Google is doing the serving. Your website only needs to output the code for the iframe and YouTube does the rest, so you same on bandwidth by using YouTube. There are also behaviors that come from YouTube, some of which can be adjusted but essentially, YouTube decides how people experience your video, including choosing which version to serve since YouTube creates streams of different resolution to deliver to different devices.
The HTML5 video tag is simpler which gives you more control but also more work, depending on the features you want. Everything comes from the same server, so there are instances when a browser will delay loading the video, compared to an iframe which its src attribute point to a different server. It happens because most browsers have a limit on the number of connections per host, so if there are resources still being loaded from your site, it will wait to load the <video> element, while it would not wait to load the <iframe> since it is hosted by YouTube.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
