What does server-rendered mean?
Server-rendered means the HTML for a web page is generated on a server before it gets sent to your browser, as opposed to something like React where the page is rendered in the browser by JavaScript.
When you visit a server-rendered page, the server does all the work of building the HTML. Your browser receives a complete page and can display it immediately. This is how the web worked since the beginning.
This is different than client-side rendering with frameworks like React and Vue, where your browser receives mostly empty HTML and then JavaScript builds the page in your browser. With client-side rendering, you often see loading spinners while the page builds itself.
There’s a bit of nuance here. Traditional frameworks like Rails, Django, and PHP applications have always been server-rendered. But when developers talk about SSR today, they’re usually referring to modern JavaScript frameworks like Next.js with React, or Nuxt with Vue. These frameworks do server-side rendering but still heavily use JavaScript on the client side.
So “server-rendered” is the general concept, while “SSR” has become more specific to these hybrid approaches that combine server rendering with client-side JavaScript frameworks.
So what are the pros and cons of server-rendering?
The biggest pro is faster initial page load. Users see content immediately instead of staring at a blank page. It’s also better for SEO since search engines can see your content right away without running JavaScript. And it’s often simpler to build since you don’t need to coordinate between server APIs and client JavaScript as much.
The cons are that every page navigation requires a full page reload and round trip to the server. Building highly interactive features like Google Maps can be difficult or impossible. And if you start with a server-rendered app but then end up needing a lot of interactivity, you’re going to either have to hand roll a bunch of JavaScript, or introduce a JavaScript framework anyway.
So it really depends on the needs of your application. That being said, many, many applications really are just a series of static pages without that much interactivity and could benefit from being server-rendered.
See also What is SSR?