Performance Tip 3 - insertAdjacentHTML vs. insertAdjacentElement

Calling the createElement and insertAdjacentElement methods can often be faster than calling the insertAdjacentHTML method.

Click the buttons to see the difference in performance.

Slow -  

Faster -  
© 2007 Microsoft Corporation. All rights reserved. Terms of use.