vite-ssr icon indicating copy to clipboard operation
vite-ssr copied to clipboard

Non-JS output mode for search engines

Open imShara opened this issue 3 years ago • 2 comments

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.

imShara avatar Nov 18 '21 22:11 imShara

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 👍

frandiox avatar Dec 26 '21 20:12 frandiox

Yes, I have already made this by stripping <script> tags with regexp, but parsing output is heavy operation.

imShara avatar Dec 29 '21 03:12 imShara