Do you prefer to send json or html from the backend in ajax calls and in what situations the other way?
I was never sure which is a more efficient way of rendering the html data and sending it back to the user. Generating it on the backend and sending the raw html data then adding events or other modification using frameworks as jQuery, or always send the data in json format and then render it using javascript or any js framework. What do you prefer and when do you think it's better to do it one way or another in terms of performance, efficency and security?
Do you prefer to send json or html from the backend in ajax calls and in what situations the other way?
===

I was never sure which is a more efficient way of rendering the html data and sending it back to the user. Generating it on the backend and sending the raw html data then adding events or other modification using frameworks as jQuery, or always send the data in json format and then render it using javascript or any js framework. What do you prefer and when do you think it's better to do it one way or another in terms of performance, efficency and security?