How to build a SPA from a multi-page website without losing search traffic?

What Angular.JS that React.JS build a house exclusively in JavaScript. And it turns out that search engines are getting a blank page with a bunch of JavaScript.

If we assume that we already have a website consisting of a backend and a conventional layout. How to make it a SPA? So much so that the template is fully preserved for the bot, but for a standard user (with included JS) all happened in SPA. Only native JavaScript om? Popular frameworki do not know how?
April 3rd 20 at 18:51
3 answers
April 3rd 20 at 18:53
The answer is simple - the server rendering pages. All modern frameworks that are able to:
I'm here on habré cons read:
- the relevance of the data important and rapidly changing
- the amount of data does not allow to build static
- build static too long for you - jerome.Grady64 commented on April 3rd 20 at 18:56
@Zackery.Nicol, and where you read?

All use, we use. Where tkni - any company uses. - amelia_Williams commented on April 3rd 20 at 18:59
@Zackery.Nicol, "the relevance of data is important and is changing fast" - what exactly is it? When a search robot pulls a particular page on the server, NodeJS executes the js code and spits out html. This is not PreRender some kind, which rendered the page once, and each time the same give. It is possible to cache, Yes, but that in ordinary sites do. About the other two points don't quite understand. - lenora_Johns commented on April 3rd 20 at 19:02
@Zackery.Nicol, It is not a static snapshot but it is a render. - keshaun76 commented on April 3rd 20 at 19:05
nextjs in the list, you can add - Ludwig_Miller commented on April 3rd 20 at 19:08
April 3rd 20 at 18:55
The main problem is that your finished website is already written at some the technology stack and most likely it is something in php. Angular, react, vue is originally a framework written in javascript. And the main problem you will face is changing the language. Routing, working with data, data output and all other issues you will need to write in js. And Yes, you can send in the furnace all that is written earlier and leave from this algorithm. But don't worry, you php is also useful. It is possible to distribute the backend and give it will now be exclusively json. Overall: Yes, it can be done but you need to learn a new language, framework on it, and then rewrite the whole thing, what you have written. As someone who has a similar goal will tell you that it is not easy.
April 3rd 20 at 18:57
If You will be able to return content nodes from the backend, you can do this:
1. To create the backend API to return a specific node (GUI blocks)
2. On the front use includeHTMLwhen you need to make transitions and to load different content in different blocks.

This will speed up the job site to the end user without losing the current position in the search engines with minimal code appending.
For vue there is a library nuxt. A for next the react js. Will have to change the ranting and mounting. But there is not much different. Just rendering comes from the server - adrain.Pfannerstill commented on April 3rd 20 at 19:00

Find more questions by tags AngularFrontend