0

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

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.

Community
  • 1
  • 1
Mark Boulder
  • 13,577
  • 12
  • 48
  • 78
  • Possible duplicate of [Does Schema.org markup work if markup is dynamically builded with JavaScript?](http://stackoverflow.com/questions/29064209/does-schema-org-markup-work-if-markup-is-dynamically-builded-with-javascript) – unor Sep 30 '15 at 18:52
  • @Mark are you talking about dynamically changing microdata, json-ld or rdf? – Mousey Oct 01 '15 at 02:58

1 Answers1

2

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.

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.

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

tosc
  • 759
  • 4
  • 16
  • Thanks. It's just that I'm using JS to embed some user submitted URLs and would like to extend their microdata info based on whether it's YouTube, SoundCloud etc. – Mark Boulder Oct 02 '15 at 04:12
  • 1
    If you have no way of providing the enriched content directly in the source, I'd just leave the links as they are. Microdata won't help your users and if you embed it via js, nor will it help the bots. – tosc Oct 02 '15 at 04:46
  • Google can crawl dynamically added JSON-LD, as explained in this [Google article](https://developers.google.com/search/docs/guides/intro-structured-data) – GeorgeP Aug 26 '19 at 00:37