Live data from Hacker News

Ask HN: What happened to server-side rendering?

news.ycombinator.com

41–50 of 74 posts

Re: Ask HN: What happened to server-side rendering?

#41
post #30

I've had great success with Vue's builtin SSR - https://vuejs.org/v2/guide/ssr.html Great for FB/twitter share scraping, google scraping, etc. Also much better startup speeds. Once you get it configured it's very little additional work to maintain. I have it set up to do things like determine mobile/desktop depending on the `user-agent` to determine the prerendered page to serve, and then the client side JS takes ove…

> Great for FB/twitter share scraping, google scraping, etc. Google scraping? How/why can it be used for google scraping? Doesn't google return html result pages?

I believe they mean Google can easily scrape your page. Otherwise known as "SEO" in this context.

Re: Ask HN: What happened to server-side rendering?

#43

Earlier quoted context omitted.

He's talking about web apps.

He/she is probably talking about single-page apps. But it isn't clear.

He/she is probably talking about single-page apps

If you want to be pedantic about it, sure.

Re: Ask HN: What happened to server-side rendering?

#44
post #12
post #6

Universal rendering is widely used in the React ecosystem, in large part thanks to Next.js[0] making it simple to set up and run. Many large sites like Marvel.com, Nike.com, Invisionapp.com, hulu.com and many more run on server-side rendered React, see the Next.js showcase for a more complete list: https://nextjs.org/showcase [0]: https://github.com/zeit/next.js/

Agreed. I'm a big fan of Next.js and haven't had any major problems with it. While there have been some quirks and nuances I had to learn[0] it still provides the easiest platform for SSR out of the box. [0]: https://leerob.io/blog/things-ive-learned-building-nextjs-ap...

I'm evaluating next.js for a new project. But coming from create-react-app, I'm a bit skeptical of these "frameworks" that seem to provide little benefit beyond developer tooling (i.e. setting up webpack, hot reload etc). create-react-app was great in the beginning, but months later was really annoying. I get the feeling next.js could end up like that. At least you can eject from CRA.

I'm curious if anyone has gone the "roll your own" route with SSR + react, starting with a simple approach and adding complexity only as it becomes necessary. Has anyone done this and maybe also used next.js? I would love to hear a comparison, because at the moment I'm unconvinced next.js is really necessary if you know what you're doing, or you intend to maintain the project for more than 2 years.

Re: Ask HN: What happened to server-side rendering?

#45
post #41
post #30

Earlier quoted context omitted.

> Great for FB/twitter share scraping, google scraping, etc. Google scraping? How/why can it be used for google scraping? Doesn't google return html result pages?

I believe they mean Google can easily scrape your page. Otherwise known as "SEO" in this context.

Thanks. I know what SEO is, the word "scraping" confused me, because it usually refers to people scraping the pages of various services.

Re: Ask HN: What happened to server-side rendering?

#47
post #31
post #13

The main advantage of server-side rendering of client-side templates is cutting your initial load time to a bare minimum (not having to wait for scripts to load/compile, taking advantage of page caching, etc.). However, this usually only matters when you're afraid of users getting impatient and bouncing, which tends to be true of sites that mainly display content and don't have a ton of interactivity, and sites like…

A big one for the need of server side rendering is SEO. Without server side rendering, most web crawlers don't have access to your content and you can't rank for SEO.

SSR for the purposes of SEO can be achieved in a simpler way, without complicating your whole app to support SSR.

Just pre-render the page in headless chromium / puppeteer when a search engine bot requests it and return the resulting html.

Re: Ask HN: What happened to server-side rendering?

#48
post #47
post #31

Earlier quoted context omitted.

A big one for the need of server side rendering is SEO. Without server side rendering, most web crawlers don't have access to your content and you can't rank for SEO.

SSR for the purposes of SEO can be achieved in a simpler way, without complicating your whole app to support SSR. Just pre-render the page in headless chromium / puppeteer when a search engine bot requests it and return the resulting html.

This is pretty slow though right? Those speed penalties will impact your google search ranking.

Re: Ask HN: What happened to server-side rendering?

#49
post #35
post #34

Earlier quoted context omitted.

Given the prevalence of client-side rendering, I think all the major players have learned to circumvent this. They can run a full headless browser instead of just looking at the raw HTML, and detect when the JavaScript seems to have rendered the content. That said, user experience (in this case site speed) can be a factor in how Google actually ranks pages, so that could be another motivation.

Well... as everything else with how Google's crawler and algorithms work, there are no official or definitive answer, but what has been communicated is that it could work but definitely more difficult and can lead to more issues. Knowing a bit about SEO, if you want to invest in your ranking, I wouldn't go without server-side rendering.

A lot of seo data is meta tags in the head. These aren’t going to render client side.

Re: Ask HN: What happened to server-side rendering?

#50
post #12

Earlier quoted context omitted.

Agreed. I'm a big fan of Next.js and haven't had any major problems with it. While there have been some quirks and nuances I had to learn[0] it still provides the easiest platform for SSR out of the box. [0]: https://leerob.io/blog/things-ive-learned-building-nextjs-ap...

I'm evaluating next.js for a new project. But coming from create-react-app, I'm a bit skeptical of these "frameworks" that seem to provide little benefit beyond developer tooling (i.e. setting up webpack, hot reload etc). create-react-app was great in the beginning, but months later was really annoying. I get the feeling next.js could end up like that. At least you can eject from CRA. I'm curious if anyone has gone t…

The spectrum chat team, which GitHub acquired, wrote that they wish they had started with next.js https://mxstbr.com/thoughts/tech-choice-regrets-at-spectrum/
Post reply on HN