使用jQuery更改schema.org微数据? [英] Changing schema.org microdata with jQuery?

查看:130
本文介绍了使用jQuery更改schema.org微数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 Googlebot在解释JS方面的最新进展,现在是否可以通过以下方式更改 schema.org微数据(即itemprop) jQuery吗?

Due to Googlebot's recent advances with interpreting JS, is it now possible to change schema.org microdata (ie. itemprop) with jQuery?

这里有一个类似的问题:是否可能要使用jQuery更改Microdata itemprop吗?-但这是在Googlebot上面提到的最近改进之前.

There's a similar question here on SO: Is it possible to change Microdata itemprop with jQuery? -- but it was from before Googlebot's recent advances mentioned above.

推荐答案

schema.org,RDF,微数据等旨在为机器提供上下文和信息.它为他们提供了一种在无需执行客户端代码(即JavaScript)的情况下访问信息的方法,并且仍然能够理解"您在说什么.

schema.org, RDF, Microdata, etc. are designed to provide context and information for machines. It provides them a means of accessing the information without having to execute client side code (i.e. JavaScript) and still be able to "understand" what you're talking about.

即使Google能够理解您的客户端编辑,它也不是唯一的漫游器-其他人将不会接受这些更改.

Even if google was able to understand your client side edits, it's not the only bot out there – others will not pick up these changes.

我建议您不要使用客户端代码来编辑旨在机读的信息.使用它向您的用户显示内容.

I'd suggest that you don't use client side code to edit information that's intended to be machine readable. Use it to display content to your users.

如果您不想弄乱您的标记,请查看 JSON-LD .

If you don't want to mess with your markup, have a look at JSON-LD.

您可以使用Google的结构化数据测试工具轻松地测试您的标记.

You can easily test your markup with google's Structured Data Testing Tool.

这篇关于使用jQuery更改schema.org微数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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