This seems like a Rube Goldberg solution for a problem better solved by just... not using a SPA for a page with the primary function of displaying text.
I mean, maybe I'm missing something. What's an example of a page where this would be useful where an SPA isn't vast overkill over just sending HTML to the client in the first place?
It says that using Headless Chrome is vastly superior to any Rube Goldberg-ish solution, including SSR and data injection.
The glaringly obvious exception to your assertion is a site like Amazon.com and all e-commerce websites! They're very dynamic, modern apps that have a ton of text that needs to be indexed for SEO.
One of the first products I built with Relay was a server rendered app with preloading and all sorts of bells and whistles for incremental loading. Think Twitter Lite, but faster and a couple of years earlier.
I didn't ship it because the client side JS was unnecessary for most use cases, and the old server generated site outperformed the client rendered one. I put the user ahead of the tech. But then I see the rest of our industry heaps praise upon people who build worse products because they want to use a shiny technology.
Twitter Lite fell into the exact same trap I did, but they shipped anyway. Their no-JS site is an order of magnitude faster than their New and improved "Lite" version.
Server rendering is useful as a performance optimisation. To say that the headless browser model is better because it's easier is completely missing the point.
4 comments
[ 3.2 ms ] story [ 17.6 ms ] threadI mean, maybe I'm missing something. What's an example of a page where this would be useful where an SPA isn't vast overkill over just sending HTML to the client in the first place?
The glaringly obvious exception to your assertion is a site like Amazon.com and all e-commerce websites! They're very dynamic, modern apps that have a ton of text that needs to be indexed for SEO.
I didn't ship it because the client side JS was unnecessary for most use cases, and the old server generated site outperformed the client rendered one. I put the user ahead of the tech. But then I see the rest of our industry heaps praise upon people who build worse products because they want to use a shiny technology.
Twitter Lite fell into the exact same trap I did, but they shipped anyway. Their no-JS site is an order of magnitude faster than their New and improved "Lite" version.