server-side rendering

  Client-side rendering, the code contains an ajax request, and the data returned by the ajax request, right-click in the browser -> view source code, it is invisible, and you can see it by inspecting the element. Baidu crawls out the data that cannot crawl ajax requests, which is not conducive to seo.

  Server rendering, on the server, use a template engine, such as art-template, to replace the variables in the original page and send it to the client. For example, in an html page, <h2>discussion on the deeds of {{ name }}</h2>, what the client gets after the server renders is, <h2>discussion on the deeds of Lei Feng</h2>. In this way, the source code can be viewed, and Baidu crawlers can crawl it, which is beneficial to seo.

  The product display page of Jingdong Mall uses server-side rendering, while the comment area uses client-side rendering (ajax asynchronous request).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325065800&siteId=291194637