Hacker News new | ask | show | jobs
by nagyf 1166 days ago
Does SPA concept work well with search engines? I moved away from web development, but SPAs used to be very bad if you wanted to appear in Google search.

Btw I was looking into Django recently, they are still using the “older” paradigm you are referring to.

2 comments

You can server-side render the SPA. Not with Django, but with things like Nuxt or Next.

Then the SEO penalty is just the increased page size (maybe some extra loading time). But at least the content can be crawled normally.

I think Google is capable of handling SPAs these days (it can execute js now), so works fine mostly (might still be better to serve full HTMLs to start with).
It technically can render javascript, but there's a performance penalty that negatively affects your crawl budget.

If you're twitter or facebook, or have enough domain reputation already that your crawl budget is big enough to offset, then it doesn't matter. If you are not already a big deal, then it takes a lot of off-site traction to overcome.

Practically speaking, for two otherwise-even sites just starting out, a statically rendered site has a pretty significant SEO advantage over a JS-only site.

(Which is why hydration is a thing)