In the documentation for vue, talk about server rendering and pre-rendering ( https://github.com/chrisvfritz/prerender-spa-plugin ). Tell me please, what is the difference between pre-rendering and server rendering? (the documentation is simply very concisely written and it is not clear, maybe someone has already used ....)

    1 answer 1

    Prerender is a kind of static site under dynamic. You start the build, select all the component data (maybe even asynchronous) and prerender to the file for quick download. From time to time you need to distort the generator to change the dynamic content. If the server is rendering, then the page is rendered every time when you access this page (of course, you can configure the cache and everything in this spirit).

    From the above, you can make a conclusion: server rendering works when the user accesses the page, and the pre-rendering works independently of the users, it is distorted manually or you can automate this process as well. I hope I understand the essence clearly.

    • Gritsenko, thank you. It turns out that if there is authorization on the site, and different pages should be given to the same address for different users (filled with different data of this user), then the pre-rendering will not work, right? - vvtvvtvvt1
    • In such a case, neither pre-rendering nor server rendering is needed at all. The classic spa is better, because these approaches are used for adequate indexing by search engines, and only then priority is given to speed, simplicity, lightness, etc. If you want to give different content only to authorized users, then a search bot can not a priori reach this content, why pre-render it or make a server render: \ - Vladislav Gritsenko