简体   繁体   English

RDFa用于以javascript呈现的视频

[英]RDFa for videos rendered in javascript

I am trying to add RDFa tags to videos so they can be indexed by Google and Yahoo. 我正在尝试向视频添加RDFa标签,以便它们可以被Google和Yahoo索引。 However the object and embed code for the videos are inserted by javascript, so they aren't actually in html. 但是,视频的对象和嵌入代码是由javascript插入的,因此它们实际上不在html中。 Can I put a duplicate object in a noscript tag? 我可以在noscript标签中放入重复的对象吗? Is there another solution? 还有其他解决方案吗?

http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=162163 http://www.google.com/support/webmasters/bin/answer.py?hl=zh_CN&answer=162163

RDFa markup generated by Javascript is invisible to Google and Yahoo, just like other markup. 就像其他标记一样,由Javascript生成的RDFa标记对于Google和Yahoo是不可见的。

The good news is that in RDFa, the element actually doesn't matter at all; 好消息是,在RDFa中,该元素实际上根本没有关系。 it's all about the attributes . 这都是关于属性的 So you can just put all the RDFa markup on <div> or <span> elements without visible content, you don't need to use <object> . 因此,您只需将所有RDFa标记放在没有可见内容的<div><span>元素上,就不需要使用<object> You can use RDFa's resource="" attribute instead of href="" on elements that don't support href . 您可以在不支持href元素上使用RDFa的resource=""属性而不是href=""

At least that's what the RDFa spec says; 至少这就是RDFa规范所说的。 I haven't verified wether Google and Yahoo actually process it that way. 我还没有验证Google和Yahoo是否真的以这种方式处理它。

这可能会为更普遍的问题(JavaScript插入的HTML代码)提供一些帮助: 使AJAX可抓取的建议

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM