5 ms·
Wouldn't this make it even more difficult for search engines to index your pages? Also, I'm not sure we want a full rendering on the server. That will make the
by thrush 13y ago
Wouldn't this make it even more difficult for search engines to index your pages?
Also, I'm not sure we want a full rendering on the server. That will make the page appear to have a longer loading time rather than the other way around. Unless I'm misunderstanding what you're trying to say.
It does sound interesting though. I'm looking forward to your follow up posts.
- spicyj 13y agoVarious companies (in one famous case, Twitter) have found that server rendering beats client rendering for initial rendering speed. React is designed so that if you care about server rendering, you can have the best of both worlds -- using Node you can render a component to HTML on the server, then pick it up the prepopulated DOM in client-side JS once your page loads. Since the server sends down plain HTML, search engines are happy too.
- shebson 13y agoExactly this. Serving fully formed html and picking it up by a client-side framework is great for crawlers and also great for performance. In addition to React, you should check out Rendr (https://github.com/airbnb/rendr https://github.com/airbnb/rendr) - it's a really cool library for doing this via server-side rendering of Backbone views.
- woah 13y agoTried this, you have to turn your entire Node deal into Backbone. Yuck.
- sahat 13y agoDownloaded rendr, fired up the first example simple_00, opening links - Users and Repos, was painfully slow. With server MVC frameworks at least there is an indication by the browser that page you clicked on is currently loading. With client-side MVC frameworks pages usually load instantly and data arrives shortly after. In rendr, maybe it's just a terrible example, you wait 2+ seconds for a page to load and there is zero indication that page is loading.
- oinksoft 13y agoPeople have used goog.ui.Component with Soy Templates to do this for a while. You call call goog.soy stuff in your base component's createDom() so that decorateInternal() is always dealing with the same tree, whether it was rendered on the server or in the browser.
- masklinn 13y ago> Wouldn't this make it even more difficult for search engines to index your pages? If the string rendering is your initial page[0], why would it be difficult for crawlers do index pages? > Also, I'm not sure we want a full rendering on the server. That will make the page appear to have a longer loading time Servers tend to be beefy and have caches up the ass. Serving a pre-rendered "home" has been found time and again to be faster than generating it from the raw data on the client, and definitely gives the impression of faster loading. [0] https://github.com/facebook/react-page/ https://github.com/facebook/react-page/
- thrush 13y agoThanks for the useful follow up! I'm still learning a lot about Frontend Development and this definitely helps me out.