简体   繁体   中英

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?

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, 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 (ie 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM