Angular-CLI-Based-Template: Whats the best say to conditionally disable Prerendering #272

Closed
opened 2025-08-09 17:15:39 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @naveedahmed1 on 12/12/2017

@SteveSandersonMS for larger apps, its not always required to enable server side rendering for the complete app as there is some additional cost associated for prerendering https://docs.microsoft.com/en-us/aspnet/core/spa/angular?tabs=visual-studio#drawbacks-of-ssr

So, we often enable the SSR for the pages that are either common entry points of our web app or the pages that are crawlable by search engines and disabled prerendering for the rest of the app.

So, whats the best way to disable SSR for the URLs matching certain pattern.

I found ExcludeUrls in SpaPrerenderingOptions, adding urls to this array skips prerendering for these urls. Is it the most appropriate way?

*Originally created by @naveedahmed1 on 12/12/2017* @SteveSandersonMS for larger apps, its not always required to enable server side rendering for the complete app as there is some additional cost associated for prerendering https://docs.microsoft.com/en-us/aspnet/core/spa/angular?tabs=visual-studio#drawbacks-of-ssr So, we often enable the SSR for the pages that are either common entry points of our web app or the pages that are crawlable by search engines and disabled prerendering for the rest of the app. So, whats the best way to disable SSR for the URLs matching certain pattern. I found `ExcludeUrls` in `SpaPrerenderingOptions`, adding urls to this array skips prerendering for these urls. Is it the most appropriate way?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#272
No description provided.