which is faster -- innerHTML or DOM manipulation.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   E_N
Posted On:   Monday, November 12, 2007 03:53 PM

I am updating an html page by adding a lot of divs (some nested) and input elements. I want to know if it is faster to send down the html as a string and then on the client side set the innerHTML of my container div OR if it is faster to send down a JSON (nested) object and have the client side get the JSON structure and create DOM elements for each element in my JSON structure and append those to my container DIV? I am adding a lot of elements.
Thanks

Re: which is faster -- innerHTML or DOM manipulation.

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, November 13, 2007 08:10 PM

so, when you ran your tests and compared, which way was faster?
About | Sitemap | Contact