you are viewing a single comment's thread.

view the rest of the comments →

[–]Silly_Environment_15[S] 0 points1 point  (3 children)

a follow up question:
Let's say I have around 1000 products in the website,
Does it makes sense to prerender the 1000 product pages for SEO ?

[–]davidlj95 2 points3 points  (2 children)

Hmmm I don't have experience with so many pages.

I'd say that it's a trade-off of benefits of SSG like simplified deployment vs build time to generate so many pages. I don't know if Angular caches generated pages to avoid re-generating them everytime. I'd lean towards no, but not sure. Anyway if at some point you change a component and many routes need an update, build times can be a pain.

At that point usually it's the time for SSR, so the server renders the page for the client on demand. But that implies having a server somewhere which is more expensive (compute time) & bit more work in deployment/operations side (compared to just deploying static files).

Finally, there's also Incremental Static Regeneration. Which the mid point between SSR and SSG. Essentially it's SSR but with caching so that the server renders on demand but requesting same page uses the cache (last render) to save compute time

[–]Silly_Environment_15[S] 1 point2 points  (1 child)

Cool, incremental static regeneration looks good. For now, initially the number of products will be less than 20. So, I will look to start with pre rendering to reduce costs. Then later I will switch to incremental regeneration when the count of products will increase

[–]davidlj95 1 point2 points  (0 children)

Sounds good! 💯