- Feb 8, 2004
- 12,604
- 15
- 81
This is just a curiosity of mine. I know the trend for a few years has been to send raw data probably in JSON format from the server and just let the client deal with it. Is it ever a better solution to render html on the server?
I have dealt with two applications recently. One of which (I posted on here about it, the Java memory leak one) sent a 38MB JSON file to the client. And it pretty much crashed the browser trying to deal with this thing using jquery datatables. The other application was written using webforms and runs on .NET 4.x. I brought back what ended up being ~300,000 pages worth of data from the database using this application and it loaded it into a paginated table. It was a bit slow but far from crashing the client. I know 38MB and 300,000 pages are not directly comparable
But I was pretty impressed by how well the webforms application handled a large amount of data.
It made me wonder if there are ever any niche situations where html is better rendered on the server and sent to the client, like maybe dealing with huge amounts of data or something.
tl;dr as in the title really, are there any niche situations where it is better to render html on the server rather than sending a JSON to the client and letting the client deal with it?
I have dealt with two applications recently. One of which (I posted on here about it, the Java memory leak one) sent a 38MB JSON file to the client. And it pretty much crashed the browser trying to deal with this thing using jquery datatables. The other application was written using webforms and runs on .NET 4.x. I brought back what ended up being ~300,000 pages worth of data from the database using this application and it loaded it into a paginated table. It was a bit slow but far from crashing the client. I know 38MB and 300,000 pages are not directly comparable
It made me wonder if there are ever any niche situations where html is better rendered on the server and sent to the client, like maybe dealing with huge amounts of data or something.
tl;dr as in the title really, are there any niche situations where it is better to render html on the server rather than sending a JSON to the client and letting the client deal with it?