Sending html via ajax -vs- building html in js (was: jQuery Ajax request to update a PHP variable)

From: Nate Vack <njvack_at_nyob>
Date: Wed, 7 Dec 2011 16:02:52 -0600
To: CODE4LIB_at_LISTSERV.ND.EDU
OK. So we have a fair number of very smart people saying, in essence,
"it's better to build your HTML in javascript than send it via ajax
and insert it."

So, I'm wondering: Why? Is it an issue of data transfer size? Is there
a security issue lurking? Is it tedious to bind events to the new /
updated code? Something else? I've thought about it a lot and can't
think of anything hugely compelling...

Thanks!
-Nate
Received on Wed Dec 07 2011 - 17:04:39 EST