N
N
Nikita Kit2017-10-29 21:12:15
JavaScript
Nikita Kit, 2017-10-29 21:12:15

Will robots read dynamically created attribute in meta?

The question is simple. I have a component:

ul.crumbs__list(itemscope itemtype="http://schema.org/BreadcrumbList")
      li.crumbs__item(itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem")
        a(href='/', itemprop="item")
          span(itemprop="name")|Главная
          meta(itemprop="position")

Sorry for the pug, but I think everyone will understand.
According to the schema standards, the meta itemprop must contain the content attribute with the item index. php I don't know and write all the backing in MODX. I don’t know how to calculate and put data on the server, and I consider this application of the server language a crutch and wrote a recalculation in js:
moduleItems.each ->
    item = $(this)
    itemIndex = item.index() + 1
    metaData = item.find('meta')
    metaData.attr('content', itemIndex)

sorry for the coffee, but I think everyone will understand.
The question, actually, in a subject. When requesting a pure html document without js meta, it will naturally be without content. Will the robots read the markup after initializing the crumbs logic script or will they forget about js and have to resort to php?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kovalsky, 2017-10-29
@ShadowOfCasper

Here are some tests, from searchengineland and from Teletext.io , at least for Google, dynamic content is not a problem.

P
Puma Thailand, 2017-10-30
@opium

Search engines are a black box, they may or may not read, do it in PHP and don't do anything stupid

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question