Which is better in AJAX request, Response with ready HTML or response with just data and write HTML using JavaScript, and this JavaScript will use a predefined HTML template to put the coming data inside and show on the page.
Creating the HTML on the server and send to the page, will decrease the client side JS code, but will increase the response size.
Sending the data to the client side will decrease the response size but will increase the JS code.
Which is better and most used?