Definitive best practice for injecting, manipulating AJAX data
- by Nic
Ever since my foray into AJAX, I've always used the "whatever works" method of manipulating AJAX data returns. I'd like to know what the definitive and modern best practice is for handling data.
Is it best practice to generate the HTML via the server script and introduce the returned data on the onComplete function? Should XML/JSON be looked at first before anything? How about manipulating the returned data? Using .live() doesn't seem like it is the most efficient way.
I've never seen a definitive answer to this question. Your expertise is much appreciated.