Sam is a freelance software architect and Internet entrepreneur, currently focussing on frontend technologies. Co-organiser of NG-BE and Angular Belgium meetup.
It's not mandatory to render the complete page of the application on the server, nor is it required to render the complete list of pages on the server.
Some things don't necessary require a server side render. For example: if you are server side rendering for SEO purposes it's only necessary to render the publicly available pages, or the publicly available parts of your pages.
Google will, for example, not login on your authentication functionality when it's crawling your page. Therefor, in respect to that specific requirement, it has no added value to server side render personalized content that you would only show when authenticated
So we can choose which page to use server side render?
It that is the case, do we need two deployments? one for static hosting, another for server side rendering
Sam is a freelance software architect and Internet entrepreneur, currently focussing on frontend technologies. Co-organiser of NG-BE and Angular Belgium meetup.
Correct, you can! Only one deployment is needed. In your server side logic it's perfectly possible to choose which pages can and should be prerended and which not.
I can put together an example if you'd like, but that will require me some time :)
Sam is a freelance software architect and Internet entrepreneur, currently focussing on frontend technologies. Co-organiser of NG-BE and Angular Belgium meetup.
The answer to your question is in the second-last section of the page: "Server-side render only specific pages". I will cross post this asap to dev.to Crossposted here: dev.to/angular/creating-a-simple-m...
It's not mandatory to render the complete page of the application on the server, nor is it required to render the complete list of pages on the server.
Some things don't necessary require a server side render. For example: if you are server side rendering for SEO purposes it's only necessary to render the publicly available pages, or the publicly available parts of your pages.
Google will, for example, not login on your authentication functionality when it's crawling your page. Therefor, in respect to that specific requirement, it has no added value to server side render personalized content that you would only show when authenticated
So we can choose which page to use server side render?
It that is the case, do we need two deployments? one for static hosting, another for server side rendering
Correct, you can! Only one deployment is needed. In your server side logic it's perfectly possible to choose which pages can and should be prerended and which not.
I can put together an example if you'd like, but that will require me some time :)
That's great. I was planning to opt in SSR for my website. Thanks for the answer. If you have the time luxury I would love to have an example 😁
Hi there. I've devoted some extra time in my new blogpost to your specific question.
You can find it here: samvloeberghs.be/posts/creating-a-...
The answer to your question is in the second-last section of the page: "Server-side render only specific pages".
I will cross post this asap to dev.toCrossposted here: dev.to/angular/creating-a-simple-m...This is awesome! thanks a lot