4 ms·
The problem with this idea is that the user's browser's compute is not "free". Offloading the computing means the users have a worse experience, which will affe
by trashburger 4y ago
The problem with this idea is that the user's browser's compute is not "free". Offloading the computing means the users have a worse experience, which will affect your userbase and page rankings.
- ArcaneMoose 4y agoThat sort of depends. If the compute needs to happen regardless and now you add a layer of shipping data to and from the server, that could add even more latency and make for a worse experience.
- jasonlotito 4y agoThe argument against this is the cost of a user's bandwidth. If I have all the computation done on the server side, then I have to wait for the round trip every single time just to download the results. In this case, the browser's compute is more free, as the cost to send a remote request is more than likely higher. Like most things, there is no simple right answer, and it depends on what you are doing. But blindly assuming the experience will be worse using CSR is as silly as assuming SSR will always be worse as well.
- butlerm 4y agoIt depends on the style of application. For most line of business applications the data on the client side is potentially out of date as soon as it requested, and as a consequence very little can be done on the client side except arrange or rearrange data for display. All requests that make any substantive changes must be sent to a server somewhere anyway and client side data caching is almost useless.
- Havoc 4y ago>Offloading the computing means the users have a worse experience Does it though? Loading a webpage barely registers in cpu usage etc on a reasonably modern device
- kitsunesoba 4y agoDepends on the complexity of the page. A lot of sites with heavier JS and SPAs eat a lot of memory which can cause problems for users of the many laptops out there with 4/8GB of RAM, as well as many smartphone users who have 2GB of RAM or less. In the case of the latter visiting a heavy website can be enough to prompt the OS to kill some other app to make memory available, which means in that situation one's site is in direct competition with other things the user may be needing more than the site.
- Dalewyn 4y agoThat's a problem with the dingus that wrote all that JavaShit, not a problem with the end user's computer. We have 20+ core consumer-grade CPUs and double- to triple-digit RAM and the internet at-large (read: Web2.0) still runs like it's the 1970s.
- butlerm 4y ago> Does it though? Loading a webpage barely registers in cpu usage etc on a reasonably modern device. CPU usage is not the problem. In most cases the problem is latency including the network latency to issue and return a substantial number of remote API requests across the Internet to get the data necessary to render the page. In many cases unless you make page specific APIs that aggregate all the necessary data into a composite object on the server side this is the number one thing that slows things down. Network turnarounds are expensive but they are a lot less expensive when made inside of a datacenter than from a thousand or more miles away.
- zeroonetwothree 4y agoAggregating the data requests is pretty easy if you use something like GraphQL + one of the clients (Apollo or Relay). Probably other frameworks can do it too, I'm too lazy to check.
- mmcnl 4y agoYes, a lot. Time to first contentful paint is way worse with CSR vs SSR. Takes some time to download and run these JS bundles.