Live data from Hacker News

Ask HN: What happened to server-side rendering?

news.ycombinator.com

11–20 of 74 posts

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

#11
post #9

My two cents: 1) Lack of reliable real time ability to detect device and compute size. 2) Increased computation complexity of what to render - why put that load on the server when devices are now commensurately as fast - or even faster given the trend to distributed services that maximize network throughput over power. I'm not even sure why it was so popular in the first place; client server separation is a good thin…

It's good for accessibility...

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

#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...

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

#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 that usually shouldn't be using client-side rendering in the first place.

So you have two buckets: web apps that don't care too much about shaving milliseconds from the initial load, and content sites that shouldn't be shipping heavy JavaScript in the first place. The target market for hybrid rendering is the tiny slice of sites in-between those two, so it's a minority of use-cases. Though it is also used by sites in the latter category that are shipping heavy JavaScript anyway and having regrets.

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

#14
1) What do you mean by server-side rendering of JavaScript? It sounds like you mean executing JavaScript on the server that otherwise is destined to execute on the client-side. I execute JavaScript on the server/terminal all the time and don't call it server-side rendering.

2) What is your motivation? What problem do you think you are solving with server-side rendering?

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

#17

1) What do you mean by server-side rendering of JavaScript? It sounds like you mean executing JavaScript on the server that otherwise is destined to execute on the client-side. I execute JavaScript on the server/terminal all the time and don't call it server-side rendering . 2) What is your motivation? What problem do you think you are solving with server-side rendering ?

He's talking about web apps.

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

#19

Obligatory plug for Phoenix LiveView: https://github.com/phoenixframework/phoenix_live_view edit: This actually has examples https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera...

Is there a demo server somewhere? wonder how well it will work if you are at 200ms from the server.

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

#20
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 over depending on the viewport size and will either a) Rebuild (less than 1% of the time) changing the markup from desktop->mobile of mobile->desktop or b) Continue happily

Post reply on HN