something i cant under stand
Posted 03 July 2013 - 07:34 PM
lately im was working on a new application that required alot of ajax requests...
i was wondering, many websites return fom the server a json object and then creates the html elements with javasript and then appending it to the document. why not return the html from the server and then just append it to a div, which is more easier!
thanks in advance.
Visit my blog
Posted 03 July 2013 - 08:06 PM
Another, is that your not mixing your client side concerns with your server side concerns. Why should your server side code need to create table rows and divs?
Posted 12 July 2013 - 12:19 AM
Transmit raw data much faster
I'm from Russia. Sorry for my English!!!
Posted 12 July 2013 - 01:13 AM
One time I met a situation when I needed to load a big amount of data from server via ajax (first loading data for ajax application). And then a needed to create my page from that data.
All my researches showed me that it worked faster when I received a formed html from the server.
In spite of bigger traffic.
Browsers are not very fast workers when you need to form some big DOM structures on the fly.
Posted 12 July 2013 - 08:55 PM
setting the datatype "dataType (default: Intelligent Guess (xml, json, script, or html))" you can return what you want from the call
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users