2 ms·
99% of client-side rendered pages would provide a superior user experience with server-side render. If you're loading a single page and then unloading it that'
by onion2k 7y ago
99% of client-side rendered pages would provide a superior user experience with server-side render.
If you're loading a single page and then unloading it that's right. If you're interacting with a page it's often a lot faster to make a small request to fetch new data and just update the part of the DOM that needs to change rather than unloading everything, fetching the new page and all the associated resources that aren't cached, parsing the new page, and repainting everything.
SSR is what the web was designed for after all.
That's plain wrong. Using a browser to launch an application was one the use cases in Tim Berners-Lee's original memo about the web in 1989 - "If one sacrifices portability, it is possible so make following a link fire up a special application, so that diagnostic programs, for example, could be linked directly into the maintenance guide." (https://www.w3.org/History/1989/proposal.html https://www.w3.org/History/1989/proposal.html). There's no suggestion that the user would have to leave their browser when they clicked such a link.
Fast forward 10 years from Tim's proposal and Microsoft added XMLHttpRequest (via ActiveX) for fetching fragments of data to IE5 in 1999. We've had 20 years, which is 2/3 of the time the web has existed, of client-side applications. You may well have a preference for server-side rendering but you don't get to claim the web was designed for server-side as a fact. It's not true.
- dreamcompiler 7y agoTwo things: Ajax is a good idea and I have no problem with it. CSR for updates is not an issue. My problem is with using it for whole pages that cannot render at all until a huge JS program has been run. When you're building a SPA, this is fine. But most web pages (like the original blog post here) shouldn't be SPAs. Second, I didn't remember that clause from TBR's memo, so thanks for the reminder.