Wednesday, July 20th, 2005

Faster DHTML in 12 Steps

Category: Articles

MSDN has recurrected an old favourite, Faster DHTML in 12 Steps.

The article talks about:

  • Batch Your DHTML Changes
  • Talk to Your innerText
  • Use the DOM to Add Individual Elements
  • Expand Your Options in a SELECT Element
  • Use the DOM to Update Tables
  • Write Once, Use Many Times
  • Don’t Be Too Dynamic with Your Properties
  • Data Binding is Good for You
  • Keep Your Expando Properties Off the Document
  • Avoid switching classes and style rules
  • Collapse a Text Range Before Finding the Parent

Posted by Dion Almaer at 10:30 am
2 Comments

+++--
3 rating from 7 votes

2 Comments »

Comments feed

Since “Avoid switching classes and style rules” isn’t always realistic, be sure to take a look at the benchmarking test between the two at Quirksmode:

http://www.quirksmode.org/index.html?/blog/archives/2005/07/benchmark_tests.html

Comment by Geoff Moller — July 20, 2005

There are other propietary things in that article…

Also, instead of doing what they do, to use appendChild to add 100 new spans.
It’s better to create a document fragment using createDocumentFragment and append new elements to it. When done, append the fragment to the document, you will only have one reflow, instead of 100.

Comment by José Jeria — July 25, 2005

Leave a comment

You must be logged in to post a comment.