logo dotConferences
Menu

A few things to know about SSR

Matthieu Lux at dotJS 2017

Isomorphic JavaScript, Universal JavaScript or Server Side Rendering have been a thing these past few years. All the frameworks are now claiming that's an easy feature which only needs to be triggered. Matthieu explains why it's a bit more complicated but still an important benefit for JavaScript websites.

Slides

More details

There is still a few things to know for developers wanting to use SSR:

  • Why doing SSR? SEO has always been the main reason but the faster first paint is often the real benefit.
  • It creates a new browser workflow. First render, then interactivity, then programmatic navigation. It can creates surprising behaviors.
  • Executing your code base on a double environment (Browser & Node) has a few tricks (mention of RazzleJS).
  • Defining when your page is fully loaded for the server rendering
  • How to restart client side on a page already rendered. Most frameworks use hydration but Angular uses a second rendering.
  • SSR can be on demand or on build, it could save a lot of server processing.
  • Frameworks exists to ease all these points, you will probably want consider Next and Nuxt.

Despite all of these tricks, SSR is an important benefit for JavaScript website. You should use it even if it's not for SEO.