简体   繁体   English

React中的服务器端渲染:这是否适用于所有Route URL?

[英]server side rendering in React : Is this for all the Route URLs?

I am going to implement server side rendering through react application. 我将通过react应用程序实现服务器端渲染。 As for as I understand the index.html will be served fast from server. 据我了解,index.html将通过服务器快速提供。 I have a question. 我有个问题。 if I have a SEO url's named which is stated below, Is all the 3 URL's are rendered from the server Or It render index.html once always and then the client side take care of the URL Route ( basic | advance | test ) . 如果我有一个如下所述的SEO url,这3个URL是否都是从服务器呈现的?还是总是呈现一次index.html,然后由客户端负责URL Route(basic | advance | test)。 what happens if I have a 3 different meta tags each. 如果我每个都有3个不同的meta标签,会发生什么情况。 How it handled in that case ? 在这种情况下如何处理?

https://website.com/basic
https://website.com/advance
https://website.com/test

A typical server-side rendering setup will generate the HTML server-side when the URL is requested directly by the browser. 当浏览器直接请求URL时,典型的服务器端渲染设置将生成HTML服务器端。

Then, if JavaScript is supported (and doesn't fail for any reason), navigation within the app will be handled client-side by JS and not retrigger server-side rendering. 然后,如果支持JavaScript(并且不会由于任何原因而失败),则应用内的导航将由JS在客户端进行处理,而不是重新触发服务器端渲染。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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