3 ms·
What does he mean by pre-rendering? Do they spin-up a browser-like environment on the server and use that to render the page and cache it? Or has that idea been
by sbazerque 5y ago
What does he mean by pre-rendering? Do they spin-up a browser-like environment on the server and use that to render the page and cache it? Or has that idea been improved upon?
- lostfocus 5y agoThey render HTML on the server. Revolutionary idea.
- k__ 5y agoNo, it's more like server side rendering with PHP or Ruby, back in the days. I wrote a bit about this topic here: https://dev.to/fllstck/where-when-should-you-render-your-html-41b5 https://dev.to/fllstck/where-when-should-you-render-your-htm...
- gadders 5y agoGood article!
- deleted 5y ago[deleted]
- trinovantes 5y agoAt the end of your SPA build process, you spin up a dummy HTTP server and run headless chromium on it (e.g. with puppeteer) to render each route and save the output html. Instead of only /dist/index.html, you have /dist/index.html, /dist/about/index.html etc.
- sbazerque 5y agoThis seems... convoluted.
- Tade0 5y agoWe, the people doing front-end, like to keep things exiting.
- arcturus17 5y agoSurely you meant this facetiously?
- sbazerque 5y agoI think not, what he describes is really the way some of these tools work.
- arcturus17 5y agoWhy render headless and repackage the output though?
- trinovantes 5y agoThe main benefit is for SEO tags on each individual route and proper 404 status code