Actually prerendering is still the best, as it is only for crawlers. The user experience because of SPA is tons of time faster. I use a Redis cache and only prererender a page every week.
I think there's some confusion here. I am not advocating only using SSR like a traditional monolithic app.
I am, however, advocating having a SPA experience that is also utilizing SSR. The initial render is from the server, and then the client side JavaScript takes over to provide a SPA experience. This means that web crawlers are able to view content on that initial render of any page.
This is probably my fault in not making that clear in the article, so I will probably add that to the "Universal JavaScript" section.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Actually prerendering is still the best, as it is only for crawlers. The user experience because of SPA is tons of time faster. I use a Redis cache and only prererender a page every week.
Why not just serverside render the first page & lazily lod your JavaScript?
Food for thought: dev.to/cliffordfajardo/comment/8984
I may have stirred up some confusion here, as I think you can have both an SPA and SSR experience in one:
I think there's some confusion here. I am not advocating only using SSR like a traditional monolithic app.
I am, however, advocating having a SPA experience that is also utilizing SSR. The initial render is from the server, and then the client side JavaScript takes over to provide a SPA experience. This means that web crawlers are able to view content on that initial render of any page.
This is probably my fault in not making that clear in the article, so I will probably add that to the "Universal JavaScript" section.