I have a small sistemka accounting elephants, elephants blue, red, their addresses, names, and so on. The user can watch lists of elephants by city, by color, edit it all. In general, tabular data. At the moment, the html-code is generated by a php-script by POST requests, but for the sake of practice I transfer to ajax.
How smarter to form a table? I guess these options :
1) generate html on the server, then ajax {dataType: html} and output to the page;
2) ajax {dataType: json}, we receive, we parse, by means of js we form the table. But then there will be porridge in js, although nobody is looking there.
Additional: no load, no matter where it will be performed.