简体   繁体   English

使用jQuery更改schema.org微数据?

[英]Changing schema.org microdata with jQuery?

Due to Googlebot's recent advances with interpreting JS , is it now possible to change schema.org microdata (ie. itemprop ) with jQuery? 由于Googlebot在解释JS方面的最新进展,现在是否可以使用jQuery更改schema.org微数据 (即itemprop )?

There's a similar question here on SO: Is it possible to change Microdata itemprop with jQuery? SO上也有类似的问题: 是否可以使用jQuery更改Microdata itemprop? -- but it was from before Googlebot's recent advances mentioned above. -但这是Googlebot在上述最新进展之前的成果。

schema.org, RDF, Microdata, etc. are designed to provide context and information for machines . schema.org,RDF,微数据等旨在为机器提供上下文和信息。 It provides them a means of accessing the information without having to execute client side code (ie JavaScript) and still be able to "understand" what you're talking about. 它为他们提供了一种访问信息的方法,而无需执行客户端代码(即JavaScript),并且仍然能够“理解”您在说什么。

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. 使用它向您的用户显示内容。

If you don't want to mess with your markup, have a look at JSON-LD . 如果您不想弄乱标记,请查看JSON-LD

You can easily test your markup with google's Structured Data Testing Tool . 您可以使用Google的结构化数据测试工具轻松测试您的标记。

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

相关问题 如何使用jQuery(schema.org微格式)查找和读取元数据? - How to find and read metadata using jQuery (schema.org microformat)? Schema.org本体为json - Schema.org ontology as json 用于动态创建的搜索结果的Schema.org标签? - Schema.org tags for dynamically created search results? 如果使用JavaScript动态构建标记,Schema.org标记是否有效? - Does Schema.org markup work if markup is dynamically built with JavaScript? 添加schema.org视频标记以使用Javascript嵌入 - Add schema.org video markup to embed using Javascript 添加所需的Schema.org JSON LD标记 - adding required Schema.org JSON LD Markup 是否有一种简单的方法可以将秒转换为ISO 8601格式以供schema.org视频元数据使用? - Is there an easy way to convert seconds into an ISO 8601 format for use in the schema.org video metadata? 您如何在Google richsnippets测试工具中测试AngularJS Web应用程序的schema.org元标记? - How do you test the schema.org metatags of an AngularJS webapp in Google richsnippets testing tool? 检测是否存在具有属性的标签的最快方法[itemtype ='http://schema.org/Offer'] - Fastest method to detect if there is a tag with attribute [itemtype='http://schema.org/Offer'] 对于 Astro.js,如何访问 ld+json schema.org SEO JSON 中的 frontmatter 变量? - For Astro.js, how to access frontmatter variables in ld+json schema.org SEO JSON?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM