A
A
Alexander Dokin2019-12-16 13:08:08
Search engines
Alexander Dokin, 2019-12-16 13:08:08

Does Yandex support dynamically added json-ld?

Any documentation provides an example of injecting json-ld into the page's source code. I see a number of problems with this:

  1. to generate markup, you need to spend a certain time and resources that you would not want to use during the initial render;
  2. ok, you can generate markup in advance so that you can later insert ready-made code, but if it is large, it results in extra traffic and page load time.

The correct solution, in my opinion, is to generate static files that would be connected asynchronously after the first render, and nginx would be responsible for the return. In principle, Google supports this , but I did not find such information about Yandex.
For clarity:
  • Working option, but with problems
    <script type="application/ld+json">{json-ld}</script>

  • This search engine will not understand
    <link href="path_to/json_ld_file" type="application/ld+json">

  • Suggested solution (upload the contents of the prepared file):
    const xhr = new XMLHttpRequest();
    xhr.open('GET', url, true);
    xhr.onreadystatechange = function() {
        if (xhr.readyState === 4) {
            const script = document.createElement('script');
            script.type = 'application/ld+json';
            script.innerText = xhr.response;
            document.head.appendChild(script);
        }
    };
    xhr.send();


Yes, the markup checking tools ( google and yandex ) do not understand its dynamic addition, but at the same time it appears in the search console.
I can’t check for Yandex yet, I’m waiting for indexing.
Has anyone already asked a similar question? Do you have an answer about Yandex?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Dokin, 2020-02-06
@alnidok

No. Yandex does not support json-ld in the search engine (only in mail), so it makes no sense to think about adding it dynamically on the site pages.
That. I continue to use the microdata format on the pages, and I use the dynamically added json-ld to pass additional parameters to Google.

A
Alexander Denisov, 2020-12-31
@Grinvind

Write to Webmaster's technical support, they will answer you in detail. And if you also post the answer of technical support here, you will get a plus sign from the community as a karma)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question