Schema.org: What to use, Microdata or JSON-LD?

吃可爱长大的小学妹 提交于 2019-12-20 02:59:05

问题


The data markup Schema.org for search sites like Google, Yahoo!, Bing and Yandex is great for snippets. However, I perceive that most of webmasters use Microdata and almost never use JSON-LD. I learned about JSON-LD recently and I have some doubts:

Could I use it without compability problems with search engine?


回答1:


There can’t be a general answer:

  • Each consumer (search engine, tool, etc.) has its own conditions (what it supports for which feature).

  • Each syntax (JSON-LD, Microdata, RDFa, etc.) has its own advantages and disadvantages.

Specific example to illustrate the problem: Google recommends to use JSON-LD for some of their features, but doesn’t support it for some others (e.g., for their Products Rich Snippet).

For what it’s worth, JSON-LD and RDFa are both W3C Recommendations (while Microdata is part of WHATWG’s Living HTML standard, but no longer under development at W3C). So if you care about this, you might want to consider using RDFa instead of Microdata (see my comparison). RDFa and JSON-LD are, of course, quite different: with JSON-LD you’d have to duplicate your content, while you can reuse it with RDFa.



来源:https://stackoverflow.com/questions/34236301/schema-org-what-to-use-microdata-or-json-ld

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