Schema.org: Use Microdata, RDFa or JSON-LD?

淺唱寂寞╮ 提交于 2019-11-28 04:56:40

问题


Are there any advantages/disadvantages in using a specific format for http://www.schema.org/Product? Something like "Searchengines understand Microdata better than JSON-LD"? I would like to use JSON-LD, because it doesn't mess-up with your html-code, but I'm not sure if it would be better concerning the searchengines to use Microdata.


回答1:


There is no general answer, it depends on the consumer of the data.

A specific consumer supports a specific set of syntaxes, and might or might not recommend a subset of these supported syntaxes.

Because search engines usually try to make sure not to get lead astray (e.g., a page about X claims via its Schema.org use to be about Y), it seems natural that they would prefer a syntax that couples the Schema.org metadata to the visible content of the page (in HTML5, this would be Microdata or RDFa); for the same reasons why many meta tags are dead for SEO.

However, this is not necessarily always the case. Google, for example, recommends the use of JSON-LD for a few of their features (bold emphasis mine):

  • Promote Critic Reviews:

    Though we strongly recommend using JSON-LD, Google can also read schema.org fields embedded in a web page with the microdata or RDFa standards.

  • Sitelinks Search Box:

    We recommend JSON-LD. Alternatively, you can use microdata.



来源:https://stackoverflow.com/questions/28610710/schema-org-use-microdata-rdfa-or-json-ld

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!