Wrox Programmer Forums
|
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 12th, 2007, 04:31 PM
Registered User
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default which is faster

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?
Thanks

 
Old November 13th, 2007, 04:09 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

In my experience the innerHTML is quicker but less flexible, the code returned will probably only suit the one app.

--

Joe (Microsoft MVP - XML)
 
Old November 13th, 2007, 11:02 AM
Registered User
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you

 
Old December 30th, 2007, 08:56 AM
Authorized User
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to maz_alaameri Send a message via Yahoo to maz_alaameri
Default

I think that is right






Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion for better / faster processing elygp SQL Server 2000 2 February 13th, 2008 10:47 PM
Which one is much faster in gridview, htmltable anshumannidhi BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 0 October 11th, 2006 03:50 AM
They Want It To Be Faster! kindler Access 7 December 20th, 2005 10:54 AM
c++ faster than Pascal IvAnR C++ Programming 5 August 6th, 2005 12:08 AM
Any faster? Ben Access VBA 19 March 12th, 2004 07:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.