vite-ssr
vite-ssr copied to clipboard
Non-JS output mode for search engines
It would be nice to have option that will cut all js-related stuff from server-side-rendered page.
Modern search engines can run javascript on scanning pages, but it cost cpu budget. When you render page on server side especially for search bot, you don't need hydration and javascript could be turned off.
Forgot to comment earlier. Yeah this is a nice feature. For now, it can be done in user land by just replacing script tags in the returned HTML if the UA matches a bot 👍
Yes, I have already made this by stripping <script> tags with regexp, but parsing output is heavy operation.