protonemedia / laravel-splade-docs

MIT License
8 stars 16 forks source link

Explanation of what Blade fallback means #39

Open jitterbux opened 1 year ago

jitterbux commented 1 year ago

Hi, I am kind of lost about what "Blade fallback" here https://splade.dev/docs/ssr .

You say: "Of course, you should always prefer the rendered content by the SSR server, but it’s nice to have a fallback. This way, search engine crawlers won’t index an empty page."

Can you explain it a bit more in the docs. The current wording is kind of "mysterious" ;). I know that the missing html tags and only one div app tag instead are bad for SEO. But I have no clue what is the difference between SSR by node and SSR by "fallback" Blade - because both are sending js files and not whole html files, when you click around on links, right?

Is blade ssr slower, more CPU intensive or just "some other way" bad? What aren't we using just Blade SSR rendering instead of node SSR rendering?

I have tried it and with the Blade fallback the file that with SSR enabled (node bootstrap/ssr/ssr.mjs and SPLADE_SSR_ENABLED=true in the .env file) had 71 kB . The same file with SPLADE_SSR_ENABLED=false in the .env file) had 74 kB.

But I am not sure what is different.

jitterbux commented 1 year ago

I am in a situation when I would like to use Splade for one of my projects but there is not node installed so I can just basically use FTP.

In that situation, would the fallback blade SSR rendering be ok? What would I lose? Basically what is the difference between SSR by Node/Vite and SSR by Laravel/Blade?

Thank in advance for explanation.

jitterbux commented 1 year ago

Is the difference only in speed/performance? Meaning Vite is faster than Blade at making html pages? Can you somehow explain that a bit if possible? Thank you in advance.

mariolucasdev commented 1 year ago

I am also interested in this explanation. I have a speculation, but I would like to know too.