Vue prerendering

Intro:   Server-side rendering VS pre-rendering / server-side rendering: outputting the complete html to the client is considered a 'isomorphism' or 'generic' advantage: the first rendering is fast (there is n

Server-side rendering VS pre-rendering / server-side rendering: outputting the complete html to the client is considered a ‘isomorphism’ or ‘generic’ advantage: the first rendering is fast (there is no need to wait for all js to complete the download); It is beneficial to the energy saving of SEO,: the development is limited and needs to be in the Node.js server running environment; More server load (more CPU resources) pre-rendering: the advantage of server-side rendering is to generate static HTML files for specific routes. The front end, as a completely static site, does not need to use the web server to dynamically compile HTML in real time to improve the SEO, of a few pages. If the site has hundreds of routes, the precompilation will be very slow.

Pre-rendering Core: prerender-spa-plugin installation: save-dev cnpm install prerender-spa-plugin

Export default new Router ({mode: ‘history’, routes: [/ /.]}) vue-meta-info plug-in, web page meta tag installation: cnpm install vue-meta-info-save-dev

Related Passages:

Leave a Reply

Your email address will not be published. Required fields are marked *