Json or HTML. in what format to return data from the server?

Make dependent drop down lists. Depending on the selected value in first dropdown, the second list is loaded from the corresponding values for selection. (ajax).
Prompt in what format better to return? json or just html ?
July 8th 19 at 11:19
4 answers
July 8th 19 at 11:21
How convenient for you. Depends on the task.
July 8th 19 at 11:23
If you do not adhere to any concept, then immediately send in HTML!
July 8th 19 at 11:25
As html over the network to throw komelfo.
But for smaller problems it is possible and html.
July 8th 19 at 11:27
If the server is powerful enough, it is better to make it "thick", that is, to generate HTML on the server, not "torturing" a customer with parsing JSON with a minimum length of HTML will be faster in all respects, but if in addition to the Web interface is mobile or desktop clients, is not made on PhoneGap, etc., then JSON will be needed in any case.

Find more questions by tags AJAXJSONHTML