N
N
Ninazu2019-05-09 17:48:41
JavaScript
Ninazu, 2019-05-09 17:48:41

Are SEO tags from API legal?

Interested in how bad it is to make a completely separate application. And if not bad, then how to do it right.
There is a foreign API that returns products with their keywords.

POST /api/v1/product/search 
>>> { 
    term: "Моло"
}
<<< [
    { id: 123, "Молоко" },
    { id: 7, "Молоток" }
]

GET /api/v1/product/123
<<< {
    id: 123,
    title: "Молоко",
    relation: [ 
        {  id: 100, "Сметана" }, 
        {  id: 101, "Йогурт" }
    ],
    price: 26.00
}

And you need to make a separate application on pure JS with direct link routing and SEO optimization.
1. The user enters https://mysite.com/products/milk
2. A request is sent with a search for a product by name
3. We get an ID
4. A request is sent with an ID to get the characteristics of the product and fill in meta tags in the document
How search robots will behave when such a scenario? Will JS be executed on the page? Will they get results? How will they react to dynamic tags? And most importantly, how to implement such a Frontend correctly? So that it works like a SPA, that is, the page is reloaded only when the link is directly followed, and when searching, it works through the HistoryApi

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question