Currently, I am utilizing JSON in conjunction with AJAX to dynamically generate all necessary DOM elements. However, I have been contemplating whether this approach is ideal. For instance, when creating a table of data, would it be more efficient to construct it using JavaScript or generate it on the server and then append the result to the page?
UPDATE: My current process involves:
jQuery.getJSON(url, function(result){var table = jQuery('<table/>').append([jQuery('<td/>.....
Alternatively, I could simplify it by doing:
jQuery.get(URL, function(result){jQuery('body').append(result);}.......