I think more so than the error case (which is hopefully rare), you lose any possibility of optimistic rendering, where the user sees an immediate response (i.e. the message is added to the UI) while the server updates in the background.
The way this is set up, you must wait for an HTTP request to complete before any UI updates. I don't care how much caching you do, that will always be slower than immediate client-side update.
I really think the best way is to have both - send HTML to the client on page load, and get JSON for every subsequent request.
The way this is set up, you must wait for an HTTP request to complete before any UI updates. I don't care how much caching you do, that will always be slower than immediate client-side update.
I really think the best way is to have both - send HTML to the client on page load, and get JSON for every subsequent request.